Slot System
About
slots are normal pages that replaces the content of layout elements if found.
ComboStrap supports the following slots.
Name | Location |
---|---|
Sidebar slot | at the left side of the content |
Page header slot | at the top of a page |
Page footer slot | at the bottom of a page |
Main header slot | at the top of the content |
Main footer slot | at the bottom of the content |
Usage
You can list, edit or create secondary slots with the slot manager.
The slots work like that:
- if you want to replace the sidebar element for the whole website, you would create the sidebar slot page at the root of the page system (by default the sidebar page)
- if you want to replace the sidebar element only for a specific namespace, you would create the sidebar slot page under this namespace (for instance: :namespace:sidebar)
The slot manager shows you where you can create these slots.
Features
- A slot can be defined for every namespace (directory). If there is no slot page for a namespace, a slot page is searched in the ascendant namespace (parent, grandparent,…)
- A slot is automatically hidden and not searchable.
- Side slots (side slots) are rendered for every namespace and regenerated for each namespace change (page creation, modification, deletion)
Glossary
Bar vs Slot
In ComboStrap, a slot is a place in the template where content can be added while a bar is a UI component such as the menu bar.