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?

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/

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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