An itemspace is a mechanism of Smartest by which an item can:
- be displayed or manifested on a standard Smartest web page, and
- be replaced with another item of the same model at any time with user input alone.
Itemspaces are one of Smartest's five standard content management elements, and is triggered in a template using the
For example, imagine on the front page of a hypothetical blog, there was a space for a single "featured blog post." In Smartest, this could be given effect with an Itemspace.
An itemspace thus always gives the user an option to choose an item. However, an item space may also display a template, specifically for the purpose of displaying the item that has been chosen.
Creating a new itemspace
Itemspaces are rendered with the template tag
<?sm:itemspace:?>. For example, in the case of the "featured blog post" mentioned above, it might look something like:
This tag will be recognised, and displayed in the page elements tree as follows:
To add the itemspace to the system, simply click the "enter it now" button.
You will then see a dialogue asking you how the itemspace should be created:
The most important choices on this screen are:
- Choose the data set from which items for this data set will be selected in future, and
- Choose the template (if any) with which they will be displayed. Smartest can create a new template for you if none exist but you would like to use one.
Then save your new itemspace and the page elements tree will now show it as recognized:
Define the itemspace
Simply choose the item from the dropdown menu, and hit the 'save' button, and the itemspace will be updated. Next time the page is published, the itemspace will update on the live page too, but only if the selected item is also published.