Syntax
Guide uses tags to define where data or content should appear on a page. The most basic type of tag is a Simple Tag. Referred to as a ‘variable’ in Mustache or an ‘expression’ in Handlebars, a Simple Tag is represented in curly braces; for example, {{name}}
. When rendered, the Simple Tag will be replaced by the corresponding value from the context.
A {{name}}
tag in a basic template will try to find the name key in the current data source context. If there is no name key, the parent contexts will be checked recursively. If the top context is reached and the name key is still not found, nothing will be rendered.
Not a subscriber? Subscribe now.