Overview of structure group navigation
By default, the example DXA website creates a navigation structure based on the Structure Group hierarchy in the publication.
Default sample site navigation
The default navigation for the DXA example website is based on the structure group hierarchy in the "400 Example Site" publication.
The navigation model:
- is rendered by a special page called "_Navigation "
- uses a Component Template called "Generate navigation"
- uses a Template Building Block called "Generate sitemap"
Inclusion and exclusion of pages in the navigation
There are several conditions that must be met in order for pages to appear in the navigation.
Navigation pages must:
- be contained within a structure group
- be published to the current target
- have a name that begins with a 3-digit number, such "030 Business"
Numbered naming convention
DXA displays or hides pages in the navigation based on a naming convention that requires a 3-digit, numeric prefix. In order for pages to be displayed in the navigation, structure groups and pages need a numeric prefix consisting of 3 numbers, such as 200 Portugal.
If the prefix is omitted, the item is not displayed in the navigation (except in the breadcrumb and site map). For example, 200 Portugal is displayed, but Search Results is not displayed.
The numbering also determines the order of items. The order is ascending with lower numbers appear before higher ones. For example, 200 Portugal is displayed before 300 Sweden.
Mapping to navigational elements
The table that follows lists the different elements that can appear on the site's user interface to provide navigation through the site.
| Navigation type | Included site elements |
|---|---|
| Top navigation | Top-level structure group whose name starts with a number, in ascending numeric order |
| Left navigation | Similar to top navigation, left navigation shows links to all sibling pages and structure group of the pages being displayed whose name starts with a number, in ascending numeric order. The current page is highlighted on the left navigation. |
| Breadcrumb | Hierarchy of the keywords |
| Site map | Titles are taken from the page's Title field |