Remove deep linking from URL for carousel component (v1) | Community
Skip to main content
Level 3
October 17, 2024
Solved

Remove deep linking from URL for carousel component (v1)

  • October 17, 2024
  • 2 replies
  • 652 views

Hello,

 

I am using   /apps/core/wcm/components/carousel/v1/carousel/ as the reference

 

As per the document https://github.com/adobe/aem-core-wcm-components/blob/main/content/src/content/jcr_root/apps/core/wcm/components/carousel/v1/carousel/README.md

 

  • Allows deep linking into a specific panel by passing the panel id as the URL fragment

I noticed that on clicking the next or previous button using the 

data-cmp-hook-carousel="previous"
data-cmp-hook-carousel="next"

 it causes the URL to append with #panel_id

 

My requirement:

I don't need the #panel_id in URL , how to remove the deep linking .

 

I tried using window.history.pushstate , but this show up  #panel_id in the URL, then after some delay using set timeout we can remove this , but I don't need this at all to appear in the URL.

 

Could you please provide inputs as how this can be achieved.

 

Regards,

Srinivas

 

 

 

 

 

 

 

 

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 arunpatidar

Hi @srinivas_opti 
The clintlibs reposible to update hash is here :

https://github.com/adobe/aem-core-wcm-components/blob/a517a37a43007856988d02b84cb3042c62877dd8/content/src/content/jcr_root/apps/core/wcm/components/carousel/v1/carousel/clientlibs/site/js/carousel.js#L620 

 

you may need to overlay this component to add your own updated clienlibs

2 replies

Level 3
October 18, 2024

Hello,

 

Any input on this will be helpfull

 

Regards,

Srinivas

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
October 18, 2024