Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Tab ID appended in URL

Avatar

Level 3

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?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

Sady_Rifat_0-1690464895442.png

 

 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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.

Sady_Rifat_0-1690464895442.png

 

 

Avatar

Community Advisor

@nivethaS ,

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-7...

 

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

 

Avatar

Level 3

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).