Navigation allows an author to build a site navigation. Navigation structures can be built from live copies of a blueprint, language copies of a language master or from a simple page tree.
Simple navigation with no configuration applied. Shows a navigation structure built from a page tree. The navigation root is excluded by default.
- jcr:primaryType: nt:unstructured
- jcr:createdBy: admin
- startLevel: 2
- skipNavigationRoot: true
- jcr:lastModifiedBy: admin
- jcr:created:
- navigationRoot: /content/core-components-examples
- showHidden: true
- jcr:lastModified:
- hideCurrent: false
- sling:resourceType: core/wcm/components/navigation/v1/navigation
- collectAllPages: true
By default, the navigation root is excluded in the navigation structure. In this example we display it.
- jcr:primaryType: nt:unstructured
- jcr:createdBy: admin
- startLevel: 2
- skipNavigationRoot: false
- jcr:lastModifiedBy: admin
- jcr:created:
- navigationRoot: /content/core-components-examples
- showHidden: true
- jcr:lastModified:
- hideCurrent: false
- sling:resourceType: core/wcm/components/navigation/v1/navigation
- collectAllPages: true
Multiple root levels can be skipped. In this example we are skipping two, showing the main categories.
- jcr:primaryType: nt:unstructured
- jcr:createdBy: admin
- jcr:lastModifiedBy: admin
- jcr:created:
- navigationRoot: /content/core-components-examples
- jcr:lastModified:
- sling:resourceType: core/wcm/components/navigation/v1/navigation
- collectAllPages: true
- structureStart: 2
By default, the navigation is built from all child pages. In this example, we again display the navigation root and reduce the structure depth to one. As a result, only one level from the navigation root is shown.
- jcr:primaryType: nt:unstructured
- jcr:createdBy: admin
- startLevel: 2
- skipNavigationRoot: false
- jcr:lastModifiedBy: admin
- jcr:created:
- navigationRoot: /content/core-components-examples
- showHidden: true
- jcr:lastModified:
- hideCurrent: false
- sling:resourceType: core/wcm/components/navigation/v1/navigation
- collectAllPages: false
- structureDepth: 1