Static Items

Static tagTop of Page

Tag : <ion:static />

This tag can be used as children of the tags : <ion:page />, <ion:article /> , but also as standalone, to display all the static items of one collection.

It must be used with its element definition children tag.
If you have defined one Static Item which has the name "stickers", the tag <ion:static:stickers /> will give you access to this static item.

Parents (page, article) can have several Static Items linked to them.

Attributes

In this table, we consider one Static Item called "my-item", which has one field called "my-field".

AttributeOptionalValuesExample
all yes

true.

Set to true, it will loop through all static items of one definition.

<ion:static:my-item all="true">
...
</ion:static:my-item />
limit yes

integer.

Limits the number of items displayed or returned.

<ion:static:my-item limit="3">
...
</ion:static:my-item />
return yes

json.

Set to true, the result will be return in JSON format, instead of been displayed.
Useful for JS usages.

<ion:static:my-item:items return="json" />

Children tags

In this table, we consider one Static Item called "my-item", which has one field called "my-field".

TagReturnsExample
<ion:static:my-item /> Nothing.
Parent tag for the element.
<ion:static:my-item:title /> Title of the item, as defined in the definition of the Static Item
<ion:static:my-item>
<ion:title tag="h3" />
</ion:static:my-item>
<ion:static:my-item:items /> Instances created by the editor for this Static Item.
<ion:static:my-item>
<ion:items>
...
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:my-field /> Field data for the current Static Item instance
<ion:static:my-item>
<ion:items>
<ion:my-field>
...
</ion:my-field>
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:index />
Index of the item in the list.
Starts at 1.
<ion:static:my-item>
<ion:items>
<ion:index is="1">
... display this if the item is the first one
</ion:index>
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:my-field:label />
Label of the field as defined in the Static Item
<ion:static:my-item>
<ion:items>
<ion:my-field:label />
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:my-field:value /> Value of the field
<ion:static:my-item>
<ion:items>
<ion:my-field:value />
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:my-field:options /> Available options for one field with multiple choices (Radio, Checkboxes, Select).
<ion:static:my-item>
<ion:items>
<ion:my-field>
<ion:options>
<ion:value/> : <ion:label/>
</ion:options>
</ion:my-field>
</ion:items>
</ion:static:my-item>
<ion:static:my-item:items:my-field:values /> Selected values for one field with multiple possible values (Radio, Checkboxes, Select)
<ion:static:my-item>
<ion:items>
<ion:my-field>
<ion:values>
<ion:value/> : <ion:label/>
</ion:values>
</ion:my-field>
</ion:items>
</ion:static:my-item>

Special fields : medias, links

TagReturnsExample
<ion:static:my-item:items:my-field:medias /> Loops in medias if my-field is of type "medias"
<ion:static:my-item>
<ion:items>
<ion:my-field>
<ion:medias type="picture">
<ion:media:url />
</ion:medias>
</ion:my-field>
</ion:items>
</ion:static:my-item>
<ion:static:my-item:item:my-field:links /> Loops in links if my-field is of type "Internal Link"
<ion:static:my-item>
<ion:items>
<ion:my-field>
<ion:links>
<ion:title /> : <ion:url />
</ion:links>
</ion:my-field>
</ion:items>
</ion:static:my-item>