In case pagelets are not rendered automatically with the <ISSLOT>
tag, but with the combination of <ISSLOTITERATOR>
and <ISPAGELETASSIGNMENT>
, the developer has to make sure the necessary rendering events are triggered. For triggering those events for the rendered slot the combination of <ISRENDERENTITYRENDERINGSTART>
and <ISRENDERENTITYRENDERINGEND>
has to be used. But to trigger the render events for the placeholders of a slot the custom tag <ISCREATEPLACEHOLDERRENDEREVENTS>
needs to be used. This will provide the needed handles to placeholders in the Design View for pagelets that are not rendered with <ISSLOT
>.
Note
The the <ISCREATEPLACEHOLDERRENDEREVENTS>
tag only works with PageletAssignments. It will not work if only a Pagelet is available to be rendered.
<ISCreatePlaceholderRenderEvents ( RenderContextID = "( {String} | {ISML expression} )" PageletAssignment = "( {ISML expression} )" Slot = "( {ISML expression} )" ComponentHierarchyKey = "#ComponentHierarchyKey#" ) >
The example below shows how placeholder render events can be created for pagelets rendered with
<ISPAGELETASSIGNMENT>
.
<isslotiterator Slot="#Pagelet:SubSlot("app_sf_responsive_cm:slot.container.content.pagelet2-Slot")#" AssignmentsAlias="ContainerPageletAssignments"> <ISUUID name="RenderEntityID"> <ISRenderEntityRenderingStart RenderEntityRenderObject="#Pagelet:SubSlot("app_sf_responsive_cm:slot.container.content.pagelet2-Slot")#" RenderEntityID="#RenderEntityID#"> <ISCreatePlaceholderRenderEvents RenderContextID="#RenderEntityID#" Slot="#Pagelet:SubSlot("app_sf_responsive_cm:slot.container.content.pagelet2-Slot")#" ComponentHierarchyKey="#ComponentHierarchyKey#"> <isloop iterator="ContainerPageletAssignments" alias="ContainerPageletAssignment" counter="PageletCounter"> <isif condition="#PageletCounter > PageletConfigurationParameters:UpperBound#"> <isbreak> </isif> <ISCreatePlaceholderRenderEvents RenderContextID="#RenderEntityID#" PageletAssignment="#ContainerPageletAssignment#"> <ispageletassignment PageletAssignment="#ContainerPageletAssignment#"> </isloop> <ISCreatePlaceholderRenderEvents RenderContextID="#RenderEntityID#"> <ISRenderEntityRenderingEnd RenderEntityRenderObject="#Pagelet:SubSlot("app_sf_responsive_cm:slot.container.content.pagelet2-Slot")#" RenderEntityID="#RenderEntityID#">
Starting with Intershop 7.8
With Intershop 7.8 the first usage of <ISCreatePlaceholderRenderEvents>
with the Slot
and ComponentHierarchyKey
attribute is necessary to create render events, not only for placeholders that have rendered pagelets assigned, but for empty placeholders too.
<ISCreatePlaceholderRenderEvents RenderContextID="#RenderEntityID#" Slot="#Pagelet:SubSlot("app_sf_responsive_cm:slot.container.content.pagelet2-Slot")#" ComponentHierarchyKey="#ComponentHierarchyKey#">
Intershop 7.7 will not work with this call and can only create render events for placeholders with paglets that are rendered.
The <ISCREATEPLACEHOLDERRENDEREVENTS>
tags need to be used as a combination.
The usage with the Slot
attribute needs to come first to internally build the render queue of the involved slot and placeholders (starting with Intershop 7.8). It also creates all empty placeholder events up to the first one that has a rendered pagelet assigned.
Using the <ISCREATEPLACEHOLDERRENDEREVENTS>
module with the PageletAssignment
attribute in front of <ISPAGELETASSIGNMENT>
makes sure that before the pagelet assignment is rendered the fitting opening placeholder render event is triggered and non fitting placeholder render events are closed.
At the end of rendering the pagelet assignments (mostly after a loop) it is important to trigger an additional call of the <ISCREATEPLACEHOLDERRENDEREVENTS>
without a PageletAssignment
or Slot
attribute as input to close a possibly still opened render event and finish processing the render queue.
For this automatic generation of the right types of opening and closing render events for placeholders it is necessary to provide a common context for placeholders of the same slot. This context is given by the RenderContextID
.
The RenderContextID
is a mandatory attribute used to set the right context for the placeholder events. The optional PageletAssignment
attribute control the kind of placeholder render event that will be triggered.
Starting with Intershop 7.8
With Intershop 7.8 two new attributes have been introduced that enable the creation of render events for empty placeholders.
The Slot
attribute is used instead of the PageletAssignment
attribute and it needs to be combined with the ComponentHierarchyKey
attribute.
RenderContextID
The RenderContextID
is necessary to identify the placeholder events of the same context, meaning Placeholders within the same Slot. It is okay to use the same RenderEntityID
that is used for the <ISRenderEntityRenderingStart>
and <ISRenderEntityRenderingEnd>
of the surrounding Slot.
PageletAssignment
The pagelet assignment that is to be rendered and possibly needs an opening render event for the current placeholder or closing a previous render event of a different placeholder (optional).
Without this attribute the <ISCREATEPLACEHOLDERRENDEREVENTS>
tag will close an opened placeholder render event.
Slot
Note
Requires Intershop Commerce Suite 7.8 or later.
The Slot
attribute enables the <ISCreatePlaceholderRenderEvents
> module to determine the complete queue of placeholders that are part of rendering the curent slot. Only with this information it is possible to also create render events for empty placeholders.
ComponentHierarchyKey
Note
Requires Intershop Commerce Suite 7.8 or later.
The ComponentHierarchyKey
attribute is a technicality that is needed in combination with the Slot
attribute. It is necessary to map the ComponentHierarchyKey into the strict ISML module to be used with the Slot switch. It needs to always be set like this: ComponentHierarchyKey="#ComponentHierarchyKey#"
.