Skip to content
Marek Fišera edited this page Oct 12, 2021 · 3 revisions

CMS source code syntax is based on HTML, as it is the primary format. The standard HTML is extended by custom tags and custom properties.

<ui:forEach items="ce:list">
    <div class="person">
        <web:out text="ce:fullName" />
    </div>
</ui:forEach>

Custom tags

As you can see in the example above, custom tags are normal HTML/XHTML tags, but they come from registered prefix/namespace. These prefixes map to PHP classes and each custom tag maps to a function within the class. Tags can be both self-closing or with body. It is up to the tag what it does with its body. In the example above, the ui:forEach repeats its body for every "person" in the list.

Custom properties

Custom properties are a special case of custom tag attribute values. When a custom tag attribute value is in the form of "{prefix}:{name}", the compiler tries to find a property in the registered PHP class. Properties can be read-only or writable. In the example above, the ce:list provides a list of items to iterate over and ce:fullName provides a full name of the current entry.

Clone this wiki locally