- Last Modified:
- 01 Feb 2019
- User Level:
- Power User
Publishing a list of links to the pages in your site or even pages within a particular Branch lets your site visitors quickly navigate to areas of interest. You can do this with the Site Map Navigation Object. This lists Section and Subsection names hierarchically so the user can see the parent/child/grandchild etc. relationship between published pages.
The Site Map Navigation Object can also display the total number of Content Items within a Section. You can restrict the number of Content Items included in the count by Content Type(s).
An output site map could look like this:
- News (1)
- Category 1 (71)
- Category 2 (2)
- Sub-category 1 (17)
- Sub-category 2 (38)
- Sub-category 3 (42)
- Category 3 (23)
The number of Content Items for each Section is displayed after the Section name.
Because it typically appears on a single page in a site, you add the Site Map Navigation Object to content within a plain text or code only Content Type. However, a sitemap can also be styled and used as the main navigation on a site, in which case it would be added to the Page Layout.
How to Create a Site Map Object
To create this object, go to Assets > Navigation and click Create New Navigation and select Site map.
After completing the standard options used for all types of Navigation Objects, fill in each of the following, where relevant:
|Child section links||Only display the links below the start Section.|
|Levels||Enter the maximum number of levels to display, or leave it at 0 to display all levels.|
|Add content count||Display a count of the Content Items in each Section.|
|Restrict by content type||
This is a multi-list to select the Content Types used for the count above. You can choose one or more Content Types to restrict. If selected, only content within the selected Content Types will be added to the content count.
Using this setting for the sample Site map above, this might be restricted to only include content using the News Content Type.
|Maximum level count||
Set a level if you want to stop the count of content at a certain level in the hierarchy. For example, only the first two levels may have a content count displayed, but lower levels do not display the content count.
Using this setting for the sample Site map above, this could be used to generate the content count for the categories, but not for the subcategories.
Adds all Subsections and outputs a total at the parent Section (otherwise each Section has its own total).
Using this setting for the sample Site map above, the number next to "News" would be the sum of all of the numbers, plus the 1 for "News" and the number for "Category 2" would be 2+17+38+42.
The text to display before the content count.
In the sample Site map above, this would be the opening bracket preceding the number: (17).
The text to display after the content count.
In the sample Site map above, this would be the closing bracket following the number: (17).
Review your entries and selections and, if you are satisfied with your entries, click Next to generate the object.