Developer Documentation
Getting started
Overview
Semantic elements
Deployment
Custom Properties
Custom properties are defined by the designer in the elements definitions (in alahup/elements/definitions/).
In the Editor, the author is able to set a value to these properties through the interface (via dropdown menus, textfields, value setters, etc), as explained in the chapter concept).
In the element's template, $this.custom variable is an array containing these properties.
For example, let's say the list item element has an "important" property defined like this :
elements/definitions/li.xml :
<prop id="important" type="checkbox">
<caption>Important</caption>
</prop>
<caption>Important</caption>
</prop>
The author will be able to use a checkbox to define that a list item is important.
In the template, the value of the property with id="important" can be read in $this.custom.important variable.
It can be used like this :
elements/sets/default/li.tpl :
<li {if $this.custom.important}class="important"{/if}>
{render content=$this}
</li>
{render content=$this}
</li>