In order to use Constellation.Feature.Navigation successfully, any Items that represent “pages” (Items that your navigation will link to) need to include the following base template:
templates/Feature/Constellation/Navigation/Page Navigation Title
This template adds a “Navigation Title” text field to your page. This value is what should be rendered in anchor tag title attributes and inner text when creating breadcrumbs, branch navigation, and as an option in declared navigation.
Additionally, for each Page template in your system, you need to add one of the following base templates:
templates/Feature/Constellation/Navigation/Information Architecture/Page
templates/Feature/Constellation/Navigation/Information Architecture/Landing Page
templates/Feature/Constellation/Navigation/Information Architecture/List Page
These templates are “flag” templates and allow branch navigation and breadcrumb navigation to know when to “stop” traversing the content tree. Details on the meaning of these templates follows.
Information Architecture Considerations
“Page” Items
Any Item that can appear in any kind of navigation as a link that will ultimately render an HTML document should be considered a “Page” and should have the “Page” template as a base template. Note that the two page types described below already have this inheritance configured, thus you do not need to explicitly include it on your templates.
“Landing Page” Items
Items that include “Landing Page” in their base templates are treated as the uppermost limit of a branch navigation tree.
When an Item is rendered with branch navigation, the BranchNavigationRepository will inspect the item and attempt to locate the nearest ancestor-or-self that includes this semantic template reference. That ancestor will be considered the “root” of branch navigation. The link tree provided to your presentation layer will start with that item and include:
- The landing page’s immediate children that inherit from “Page”
- Any descendants of these children that are ancestor-or-self of the Context Item, which must also inherit from “Page”.
- Any “Page” siblings of ancestor-or-self descendants.
- The immediate “Page” children of the Context Item.
By default the repository will stop when it encounters ancestor Items that are either “Landing Pages” or “Folders” (Items that do not inherit from “Page”). You can configure it to traverse these “blind” content items to assemble the link tree, which will ultimately only contain Items that include the “Page” base template.
It is recommended that at a bare minimum, the “home page” of a site should include “Landing Page” in its base templates.
“List Page” Items
Items that include “List Page” in their base templates are meant to represent non-landing page items that act as a branch root Item for Pages that are classified by intervening folders, such as a Bucket.
While this library makes no immediate use of this semantic consideration, you may find it useful when designing your own navigation components.