The Insert tag displays the referenced content item as a component of the current published content item. The second inserted content item can be referenced by either an expression (expr) or path (path). The Insert tag can only be used with Publisher content items that have an associated presentation template.
Choose whether you want the content item to be referenced by Expression or Path.
Choose a property from the Properties list and click Add to insert it in the Item Property box. If the selected item property includes its own item properties, you can add one to the expression by selecting it from the second drop-down list and clicking Add.
Note: Only item property types are permitted; if there are no content items referenced in the current data entry template, the Properties list is not available.
If you want to display a message if the item is not found, type the message in the Text if INSERT fails box. (This text appears between the opening and closing <pcs> tags in the PCS Tag box.)
When the expression is evaluated or the path is traversed, a content item is the expected result. The presentation template for the content item is selected and evaluated using the same rules that would be used if it were being published directly. The results replace the Insert element.
Attribute |
Description |
Syntax | <pcs:insert
expr="expression">default
text</pcs:insert>
or <pcs:insert path="path">default
text</pcs:insert> |
Example |
<pcs:insert expr="word_of_the_day">See the dictionary</pcs:insert> or <pcs:insert path="/news/latest"></pcs:insert> |
If the specified content item cannot be accessed, the include fails and the element's content is evaluated instead. In the first example, "See the dictionary" would be displayed.