Content is scheduled, published and consumed using slots. Slots are containers for content and will model the way that content is organised on your website, app, or within an e-commerce system.
Slots can be as simple or as complex as you like. For example, you could have a slot that contains a single piece of content and represents one specific area of one page, or a slot that models an entire page and contains many different items.
- Slots are containers for content and can be as simple or as complex as you like
- The syntax of a slot type is the same as a content type. Slot types are registered on a hub using a settings file and enabled on a repository
- Repositories containing slots are marked as slot repositories
- Slot items are created using slot types. These slot items can then be added to editions, content added to the slots and scheduled for publishing. The content in the slots can then be consumed
- The banner slot page provides an end to end example
In this section we'll explain how to develop slots and include some examples. The tutorial banner slot example will take you all the way from creating a slot, through to creating a slot item, adding it to an edition and adding content to it. We'll also explain how to find the id of a slot item so that you can consume the content that it contains.
To see how to consume content published to or scheduled to be published to these slots, see the consuming content section.
For more information about how you might choose to design your slots to match the structure of your website, app or e-commerce system see the modelling slots section.
Developing a slot type
The format, structure and syntax of a slot type is exactly the same as a content type. The information in the content types section about keywords, properties, choosers and other content type elements applies equally to slots. The main difference between slots and content types is the way that they are used.
- Slot types and the slot items created from them are stored in separate repositories to your content. What you label these repositories is up to you, and you may choose to have separate repositories to manage slots for your website and app, for example.
- These repositories are marked as slot repositories so that the slot items they contain are available to select and add to editions. Repositories will be set up for you according to your requirements during onboarding.
- In order for an edition to be scheduled, each slot within it must meet its validation criteria. This includes the validation rule that all properties marked as 'required' must contain content.
Slot type development lifecycle
- Decide what your slot should model. This could includes the content it contains and whether that content can be of one or more content types.
- Create the slot type JSON file and upload it to a hosting service
- Decide which hubs the slot type should be registered with and which slot repositories it should be enabled on.
- Register the slot on the slot repository
- Create one or more slot items using this slot type.
- Add these slot items to an edition, add and schedule content.
- Consume the content published to these slots.