This page describes the concept of Modular Content which is a lower-level part of page templating in Styla Frontend. It also instructs you on how to create and update Slots and Modular Content they host.
On this page:
Modular Content are pieces of content (usually one or two modules) assigned to a specific position (a slot) in a page base and can only be displayed on a limited number of pages. The use case for this kind of content is, for instance, to display a customised intro text for all subcategory pages in each category. Or to display a teaser banner for an article about hiking on one hundred hiking boots details pages but not on cycling shoes.
/diagram here/
Managing your Modular Content
Managing this type of content is more complex than pages and page bases. You will need to create entities in three different places in Styla Editor to have a piece of Modular Content displayed on one or more pages.
1. Managing slots
Slots are locations within a base to which specific content pieces will be later assigned. They are created and managed in Slot Manager. You can reach it from the overlay appearing when you click your user name top-right:
Add a slot per each location on each of the three bases where you need to set Modular Content.
Click the Edit link on the right to create pieces of modular content assigned to this slot. First give them a name matching their target location/use case:
Once you save it, you will be automatically redirected to a page on which you can create your first Modular Content piece for this slot. Just drag and drop one or more modules and then fill them with content:
Once you are done, click the Edit entities & Publish top-right. This will let you assign this Modular Content either as the default for the given slot or to a specific product details, category or other page:
Clicking the Assign & Publish button bottom of the overlay will trigger re-rendering of all pages affected with the change.
2. Adding slots to bases and pages
If you need one or more slots including Modular Content in your Bases, go to your Bases Manager and simply drag and drop a Modular Content module to where you need your Modular Content displayed and select one of the slots you have defined in your Slot Manager:
Each of such slots in your base will render a specific Modular Content assigned to it for specific set of pages. Or, if no Modular Content assigned to a slot, it will not render any content on a specific page.
You can drag and drop the Modular Content module on single pages created with the Editor too.
3. Creating new Modular Content
Once the slots are set up and configured in your bases, you can create more Modular Content pieces. simply click the + Create button top-left of your pages list and then select the Modular Content on the list below your page name:
Once you are done creating its content, click the Edit entities & Publish button top-right to assign your new content to a slot (and specific pages if needed).
You can update Modular Content any time and the changes will be automatically reflected on all pages this content is set to appear on.
Add Comment