List

From The Smartest Wiki
Jump to: navigation, search

Lists are a feature of Smartest that allow easy user-controlled listing of items on any page.

A list requires three elements:

  • A pre-defined set of items,
  • A list template, and
  • An optional label to display above or in conjunction with the list.

Unlike other page elements such as containers and placeholders, lists do not have to be created first. As soon as the list's template tag is detected within the template, it can be defined and used on the page. However, this means a list of the same name will not share any configuration from one page to another.

In a template, a list is created and displayed using this tag:

<?sm:list name="example_list":?>

Note that just with placeholders, containers, and itemspaces, the name of the element in the template is always given in lowercase, using underscores instead of spaces.