Sometimes there is the need to receive the contents of a slot wrapped as iterator object for further processing. That way the caller of the <ISSLOTITERARTOR>
tag can include additional markup around each iterator value to make the rendering of the contained pagelet more explicit. On the contrary, when using the <ISSLOT>tag, all selected PageletAssignments
are rendered implicitly via the module's invocation.
<isslotiterator ( Slot = "( {ISML expression} )" IteratorAlias = "( {String} | {ISML expression} )" )>
<isslotiterator Slot="#Pagelet:SubSlot("slot.marketingTeaser.pagelet2-Slot")#" IteratorAlias="TeaserPagelets"> <isif condition="#hasLoopElements(TeaserPagelets)#"> <ul> <isloop iterator="TeaserPagelets" alias="TeaserPagelet"> <li> <ispagelet Pagelet="#TeaserPagelet#"> </li> </isloop> </ul> </isif>
Starting with Intershop 7.7
With Intershop 7.7 two new attributes have been introduced that provide alternative means of returning the pagelets of a slot.
With this change only the Slot
attribute is required and one out of the three alternative return attributes IteratorAlias
, PageletsAlias
or AssignmentsAlias
.
This change is useful in combination with the ISML Custom Tag - ISPAGELETASSIGNMENT, that provides additional information for the Design View when not rendering a slot with <ISSLOT>
.
Both of the following attributes are required:
Slot
The slot the contents of which should be wrapped as iterator object.
IteratorAlias
Stores the key by which the iterable elements are accessible in the pipeline dictionary.
PageletsAlias
Note
Requires Intershop Commerce Suite 7.7or later.
Stores the key by which the Collection of pagelets is accessible in the pipeline dictionary.
In comparison to using the IteratorAlias
that returns the pagelets as Iterator the PageletsAlias
returns the pagelets in a Collection.
AssignmentsAlias
Note
Requires Intershop Commerce Suite 7.7or later.
Stores the key by which the Collection of pagelet assignments is accessible in the pipeline dictionary.
The AssignmentsAlias
returns the pagelets of the slot as pagelet assignments.
This will not work for dynamic slots where pageletAssignmentsEnabled
is set to "false"
in the corresponding model element.