Content Element

IntoductionTop of Page

Content Elements are containers for Extend Fields.
When you need list of dynamic elements, in the context of the parent element (page, article), Content Elements is the solution.

For more information : Custom Data > Content Elements

Element tagTop of Page

Tag : <ion:element />

This tag is to be used as children of the tags : <ion:page />, <ion:article /> or <ion:media />

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

Parents (page, article) can have several instances of one Content Element linked to them.

Element children tags

In this table, we consider one Content Element called "my-element", which has one field called "my-field".

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

Special fields : medias, links

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