Overview of keyword navigation
Navigation based on a keyword taxonomy has certain requirements for how website components are created, including requirements for pages and a naming convention for categories and keywords.
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 associated with one or more keywords from the navigation category (the category with the string "[Navigation]" in its title)
- be published to the current target
- have a name that begins with a 3-digit number, such as "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, keywords 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 elements |
|---|---|
| Top navigation | Top-level keywords in the hierarchy Includes all keywords in the category whose name starts with a number, in ascending numeric order. |
| Left navigation | Similar to top navigation, left navigation shows links to all top-level keywords in the hierarchy, plus all sibling keywords of the keyword associated with the current page . The current page is highlighted in the navigation. Again, only includes keywords beginning with a number, and is listed in ascending numeric order. |
| Breadcrumb | Hierarchy of the keywords |
| Site map | Titles are taken from the page's Title field. |
| Keyword index page | A site map for a specific keyword Requires a page that has the keyword as its site map keyword, and that has its File Name field set to index. You must specify an index page for each Keyword that is included in the navigation (that is, for each Keyword in the Category with [Navigation] in its name that starts with three digits). |