Category and Folder Slots Contained in Locally Included Templates

Salesforce B2C Commerce tools find and show slots that are directly referenced in the category rendering template

Suppose that a merchant wants to use a category landing page (which is assigned as the rendering template) for a specific category. The landing page contains an include file. The include file contains another category content slot that is relevant to the category. Unfortunately, this configuration doesn't work. The included slot isn't listed.. If the slot is moved to the landing page (not the include) it appears.

Note:

The same constraint is also true of folder configurations. If a folder rendering template contains an include file that contains a folder content slot, the included slot isn't listed in Business Manager.

Landing page: <isinclude template="rendering/category/categoryheader" />

Header include: <isslot id="cat-landing-slotheader" context="category" description="Category Heading Banner" context-object="${pdict.ProductSearchResult.category}" />

Workaround

The solution is to put the following code in the category rendering template:

<isif condition=${false}>

<isslot id="cat-landing-slotheader" context="category" description="Category Heading Banner" context-object="${pdict.ProductSearchResult.category}" />

</isif>

The header include contains the actual slot:

<isslot id="cat-landing-slotheader" context="category" description="Category Heading Banner" context-object="${pdict.ProductSearchResult.category}" />

Related Links

Content Slot Processing