Tutorial slot
This schema snippet shows how to create a slot that can contain the tutorial banner and tutorial carousel.
The slotContent
is an array of up to 5 banners or carousels. This property is included in the required
properties, so when you add a slot created from this schema to an edition, you must add some content for the slot to be valid. See adding the slot to an edition on this page for more details.
Pre-requisitesLink copied!
You will need to have registered the tutorial banner and tutorial carousel schemas in order to add content those created from these content types to this slot.
How to useLink copied!
If you don't want to use the tutorial banner and tutorial carousel with this slot, you can update the contentTypes
array to include your own content types.
Tutorial slot exampleLink copied!
Content form previewLink copied!
An example of creating a slot item using a slot type registered from the tutorial slot schema is shown in the image below. When you create a slot in the Content Library, you'll add some dummy content. In the image below a carousel and a banner have been added.
Adding the slot to an editionLink copied!
When a slot created from this slot type is added to an edition, the slot validation is shown as "Requires content" which means that some content must be added to the slot, otherwise it does not pass slot validation and the edition cannot be scheduled. The slot must contain content because the slotContent
property in the example schema is required
.
When content has been added, the slot is valid and the edition can be scheduled.