On this page

The Templates tab

App developers can rely on App Builder's provided Smarty templates to render record, record category on the website and the record editor in the Site Admin or Customer portal. These templates can be used in most cases and do not require any action from the app developers. However, if the default templates cannot accommodate your app, App Builder allows developers to replace any template with their own templates. Currently there are 4 templates that can be replaced:

  • Page template: used to render record on the website, replaced template will be saved as appid_page.tpl
  • Collection template: used to render record category on the website, replaced template will be saved as appid_collection.tpl
  • Widget template: used to render widget on the website (for widget app only), replaced template will be saved as appid_widget.tpl
  • Edit template: used to render record editor in the Site Admin or Customer portal, replaced template will be saved as appid_edit.tpl

These templates have access to all Smarty template variables and record's data, how to display them is up to template designers. Please refer to the Template Designer section for more information.

Additionally, developers may add email templates for Send Email action, a file name can be set for an email template and then used with the Send Email action. Email templates have limited access to Smarty template variables that includes only {$system}, {$site} and record's data {$data}. You may then use:

  • {$data.recipient} for the recipient name (for email sending to a single recipient only)
  • {$data.name[$site.language]} for the record's name
  • {$data.content[$site.language]} for the record's content
  • {$data.signature]} for the default email signature
  • {$data.default_field_name} or {$data.meta.custom_field_name} for the record's fields
  • {$data.sub.SubApp_Name.default_field_name} or {$data.sub.SubApp_Name.fields.custom_field_name} for SubApp_Name's fields