Search code examples
adobeaem

Is it possible to have two different navigation menus in Adobe's AEM?


Let's say I have two pages, MyWebsite/website/index.html and MyWebsite/website/item.html. Is it possible in AEM for index.html to use menu1 and item.html to use menu2, while each menu is completely different?


Solution

  • This is easily doable. There are so many possible ways of accomplishing your goal; how you do it is going to be based on how you've decided to architect your pages, components, and authoring UX.

    If you hard include the navigation component into the page, you could have the index and item pages use different templates and page types. One page type could inherit from the other with only the partial which includes the navigation overlayed. Each page type would hard include a different navigation component.

    You could use a single page type with a hard included parsys where the author can use either of your two navigation components.

    You could use one page type and have the option to change the navigation component resource type in the page properties.

    You could have a single navigation component with the option to change designs in the component dialog.

    If by "totally different" you mean that the component style and functionality remain the same, just the link text and destinations change, then you can use a single page component and a single navigation component. The component might read the sibling and/or child pages and dynamically create the links. This is a common scenario.

    If you want the navigation component to inherit down to subpages, you can use an iparsys or a regular parsys and InheritanceValueMaps. Both are common practices with different effects depending on your goal.

    This was a very broad question. If you choose a direction that you want to go and post code with more specific questions, we can be of more help.