Note: You can learn about templates in AbterCMS here.
The Website Component provides two template types out of the box:
Variable templates can be used to display certain attributes of the entity being rendered. AbterCMS will do its best to figure out the variable implied by the template provided.
For example the following template could mean a number of things when rendered in a block:
This article was written by {{ var/author }}.
AbterCMS will try to look for an author
value in the following order:
author
attributeauthor
attributeauthor
attributeauthor
attributeNote: Implementations may choose not to execute each step separately, but construct a database query to achieve the above in one step instead.
Block templates can be used to ensure flexibility and reusability. In theory, blocks can also be nested into each other.
Let’s say you need to display three similar banners on all the “post” pages that belong to the “blog” category.
Here’s what you’ll need to ensure:
AbterCMS has an easy way to display files publicly by file categories. It will generate an unordered list with the files ready to be downloaded.
{{ files/file-category-identifier }}