Most Powerful Open Source ERP

Guideline Page Template Macro Id Is Lowercase

Follow convention for variable names.
  • Last Update:2019-07-15
  • Version:001
  • Language:en

Page Template Macro Id Is Lowercase

Macro IDs should follow the same conventions as for variables (small caps).

Good Example:

<html tal:define="foo string:renderer">
  <head>
    <title tal:content="template/title">The title</title>
  </head>
  <body>
    <tal:block metal:define-macro="my_box">
      <p tal:content="foo">foo value</p>
    </tal:block>
  </body>
</html>

In very rare cases, whenever a library of macros seems to be unrelated to anything and may not be renderer on a standard object, we recommend to prefix the page with PageTemplate_. The implied meaning is that the library is being renderer in the context of another page template. This is a last resort example and should if possible never be used.

Last Resort Example:

PageTemplate_viewCustomTableRenderer

Exception for UI control page template (lower case):

form_view
report_view
view_main
main_template
template_xhtml_style
field_render