Defining Template Conditions¶
Templates are assigned to pages using assignment rules.
Template assignment rule is a JavaScript function that returns TRUE if template matches the current PC page and returns FALSE if it does not. The location parameter is the only parameter available in the function. This parameter can be used for testing PC page URL and other properties.
To define condition for a template, you should:
Open Template Manager by clicking the Template Manager button on the left sidebar.
Expand the required template by clicking on the template title.
Select the kind of condition you want to define by clicking on it.
Type the condition in the Condition Field
Template properties will be saved automatically.
When defining conditions, you can use any standard JavaScript expressions and Flamingo API functions.
Condition Types¶
Use links below to learn how each condition type works and how to use it.
Use this condition type to assign your template to a single page.
Use this condition type to assign your template to page(s) URL of which starts with the specified string.
Use this condition type to assign your template to page(s) URL of which contains the specified string.
Use this condition to define page(s) to assign template to with the help of regular expressions.
Use this condition to assign your template to page(s) on which the specified XPath expression can be executed.
Use this condition to assign template to page(s) with the help of native JavaScript expressions.
See also