Site specific to region should be highlighted in navigation when user is in region specific site | Community
Skip to main content
Level 3
Jun 14, 2022 4:26 AM UTC
Solved

Site specific to region should be highlighted in navigation when user is in region specific site

Site specific to region should be highlighted in navigation when user is in region specific site  

 

I have a Use case where the region specific site must me highlighted in NAVIGATION bar when i am in the specific region site anyone help me how can i achieve it.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SantoshSai
SantoshSaiAccepted solution
New Participant
Jun 14, 2022 4:50 AM UTC

Hi @harido ,

I believe AEM core Navigation component should have that capability, please check here https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/navigation.html?lang=en

Otherwise, that could be achieved using JavaScript and CSS if it’s custom implemented components.

Kindly refer to the below links for more implementation details:

https://stackoverflow.com/questions/4626431/highlight-the-navigation-menu-for-the-current-page

https://m.youtube.com/watch?v=l9niaFJh8Gs

Hope that helps!

Regards,

Santosh

 

 

Santosh Sai

3 replies

ShaileshBassi
New Participant
Jun 14, 2022 12:05 PM UTC

Hi,

 

As I could think of the possible solution for implementing this:

 

1. Create the nav component and take the input from the author about the root page (as in OOTB) and Region Site level.

2. Start iterating the pages in java class and the time you get the match in the site level with the page level, you can create a idenitfier.

e.g. save all these values in a List<LinkBean> or something alike.

3. In the sightly while rendering, check for the identifier from the sling model created in Step 2 and you can add your css there.

 

Thanks

Translate
Himanshu_Jain
New Participant
Jun 14, 2022 4:56 AM UTC
SantoshSai
SantoshSaiAccepted solution
New Participant
Jun 14, 2022 4:50 AM UTC

Hi @harido ,

I believe AEM core Navigation component should have that capability, please check here https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/navigation.html?lang=en

Otherwise, that could be achieved using JavaScript and CSS if it’s custom implemented components.

Kindly refer to the below links for more implementation details:

https://stackoverflow.com/questions/4626431/highlight-the-navigation-menu-for-the-current-page

https://m.youtube.com/watch?v=l9niaFJh8Gs

Hope that helps!

Regards,

Santosh

 

 

Translate
Santosh Sai