2

In DXA 1.7 I would like to show the first level and also second level of navigation items when I am in the second level. Currently only the sister Navigation Structure Groups of the current Page are shown. I'm using the OOTB Left Navigation example from the DXA Sample site.

How could I show both the root and second level navigation items when on a second level page?

1 Answer 1

6

AFAIK the OOTB Navigation facilities only support sister level of navigation, because the NavigationLinks entity has only one level of Links.

Basically:

  • You have to make an extension of the NavigationProvider
  • To populate your own ExtendedNavigationLinks entity with several levels of links
  • And make an extended Navigation view where you can manage several levels of navigation

update

Here is a blog post describing the steps http://www.fecron.com/en/second-level-in-dxa-navigation/

2
  • Wow - sounds like quite a few steps! Any blog articles or code samples out there to demonstrate how?
    – robrtc
    Nov 17, 2017 at 10:58
  • Added Rauls blog post, excellent work! Nov 21, 2017 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.