We are using AEM 6.4. Looking for a suggestion on implementing the following feature.
We have multiple types of users that get redirected to a separate section of the website based on their role after login.
The navigation is different for every section. I want to somehow define the navigation at the home page of the section and then let all children inherit it. I don't want to create multiple templates just to have different navigation. Noticed that InheritanceValueMap doesn't allow inheriting nodes/resources but just properties, so can't use that feature.
Is there any other way to implement this iParsys kind of feature?
* How would you manage and design any single navigation? Should it require a developer to craft it? Or do you require it to be defined by an author using some kind of UI?
* Next is the mapping of the "role" to a specific navigation? Where is this maintained? Defined by a user/super-user? Admin? AEM developer?
* And finally the easiest question: How do you want to include this navigation into the page?
I would start with the details of the requirements and try to answer the first question first. One thing you could use is a Content Fragment or Experience Fragment to model to model the navigation. There is already an editor, tooling etc available for it.
For the mapping of role to navigation you probably need some type of dialog (multi-value), which allows you select a group name in a drop down and which allows to specify a navigation you created before.
When you have done that, you need to think about how it can be easily integrated into the page rendering process. I would opt to design specific a specific MainNavigation class, which encapsulates the CF/XF and is able to map that CF/XF into a navigation. The selection of the correct navigation based on inheritance is something I would hide within a adapter pattern, so you could use something like: