isslot Element

Use a placeholder where content should appear.

id = id

Allowed data type: string. Expressions are not allowed.

id identifies the slot in a slot configuration.

context = "global" | "category" | "folder"

Scope of the slot:

  • global sets the scope to every page on the site.
  • category corresponds to a specific category landing page.
  • folder corresponds to a specific content folder.
context-object = context-object

Allowed data type: Expressions only.

context_object an expression that evaluates to a category or folder object.

description = description

Allowed data type: string. Expressions are not allowed.

description describes the slot for the business user who needs to configure it.

preview-url = url

url identifies the URL used within Business Manager to preview the content slot. It you don't specify a value, a default URL is used.

The id attribute is used by Business Manager to identify the slot in one or more slot configurations. The context attribute specifies the scope of the slot. The context-object attribute is required when the scope of the context attribute is either category or folder. The context-object attribute is used to lookup the slot configuration for the given slot. Use the description attribute to describe the slot.

In Business Manager, slots are grouped by context scope. Global slots are grouped together, category slots are grouped together, and folder slots are grouped together.

For Global slots, Business Manager shows the following values:

  • Slot ID
  • Description
  • Number of slot configurations created

For Category slots, Business Manager shows the following values:

  • Category (assuming the category's configuration specifies a template that includes the <isslot> tag)
  • Category name
  • Rendering template name
  • Slot ID
  • Description
  • Number of slot configurations created

For Folder slots, Business Manager shows the following values:

  • Folder ID (assuming the folder's configuration specifies a template that includes the <isslot> tag)
  • Folder name
  • Rendering template name
  • Slot ID
  • Description
  • Number of slot configurations created

When no slot is defined in the database for a given slot ID, the <isslot> tag does not render any content. An entry is written to the log file to identify this occurrence.

In this first example, the <isslot> tag references the homepage banner and specifies the global context:

In this next example, the <isslot> tag specifies the category context:

In this last example, the <isslot> tag specifies the folder context:

The slotcontent variable is a TopLevel class system variable that lets you access the public class dw.campaign.SlotContent. This class provides access to slotting information. The following shows the mapping between the variable and the methods of this class:

dw.campaign.SlotContentTemplate implicit objects
getContent() : Collectionslotcontent.content
getSlotID() : Stringslotcontent.slotID
getCallout() : MarkupTextslotcontent.callout
getCustom() : Mapslotcontent.custom

In this first example, the rendering template shows products when the results of a slot execution returns a product slot content type. The slotcontent variable is predefined in the TopLevel.global class and provides access to the SlotContent object. It's available only in ISML templates that are defined as a slot's template.

In this next example, the template shows content assets when the results of a slot execution return a content asset slot content type.

As this next example shows, you can also check if the slotcontent variable has anything in it at all, prior to pulling the information from it, as in the following example:

In this last example, the template shows products when the result of the Slot Execution returns Slot Content Type = Product.