For a site each page can have any number of "boxes" to display and also any number of "tabs". Using the modular page concept, each tab and each box would be a modular subpage.
What is the best way to distinguish between the two types of modular content when building the templates. If both, boxes and tabs are on the same directory level then the collection is flat and would iterate over both types unable to distinguish if they are a box or a tab. However I like to iterate first over the boxes and later the tabs. I tried using a two-level modular hierarchy like below and then use page.collection|first and page.collelction|last to access tabs and boxes in the template and then have sub-templates processing the respective collection.
- some-page _tabs _tab1 _tab2 _boxes _box1 _box2 -
This works, but I wonder whether this is a sensible way of categorising modular subcontent or is there a better or recommended way were we can keep the modular pages flat rather in an hierarchy.