Tab ID appended in URL | Community
Skip to main content
Level 3
July 27, 2023
Solved

Tab ID appended in URL

  • July 27, 2023
  • 2 replies
  • 2247 views

Hi,

We are over-riding AEM cloud Tab component the tab functionality is working fine but when the user tries to hit the URL the first tab ID is appending in the URL automatically.

For Example : When we try to access https://www.test.com/home.html and tif there is a tab component in the page then it is redirecting to the URL https://www.test.com/home.html#tabs-04676-item-64e6-tab

Any idea is this the default behaviour?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sady_Rifat

Yes, this is the default behavior of the Tab component. You can check this for your surety http://localhost:4503/content/core-components-examples/library/tabs.html 

If you don't want to append the ID with the URL you need to stop using core.wcm.components.tabs.v1 clientlib.

 

 

2 replies

Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
July 27, 2023

Yes, this is the default behavior of the Tab component. You can check this for your surety http://localhost:4503/content/core-components-examples/library/tabs.html 

If you don't want to append the ID with the URL you need to stop using core.wcm.components.tabs.v1 clientlib.

 

 

Sudheer_Sundalam
Community Advisor
Community Advisor
July 27, 2023

@helptech ,

Tab IDs are implemented to enable the deeplinking of tabs using the page URLs.

Example from component library: https://www.aemcomponents.dev/content/core-components-examples/library/core-content/tabs.html#tabs-763e4cccf7-item-39c1e53864-tab

 

As @sady_rifat mentioned, you need to stop using the core component tabs client lib to stop this from happening.

 

HelpTechAuthor
Level 3
July 27, 2023

Hi @sudheer_sundalam 

 

I understand that the default behavior will append the ID to the URL when the user clicks on the tab. But in my scenario when I hit a URL which has a tab component then the first ID is automatically updated to the URL.

Example :

When I try to hit the below URL it is not appending any ID's

https://www.aemcomponents.dev/content/core-components-examples/library/core-content/tabs.html

Whereas in my scenario when I hit  https://www.test.com/home.html the ID is appended when the page loads(Before clicking anything in the Tab component).