How to display part of current URL within cq dialog field.



I created a component for placing advertisements that is being shared in several containers on different pages of my site. The component has a cq dialog for the author to choose an ad image and insert a link that the image will direct to when clicked. I am now tasked with creating a field in that component/dialog that assigns a unique tag to each ad according to the page the ad is on.

I have tried using js to grab the last part of the current URL and have that value displayed, but am stuck. Can anyone give me a helping hand?

Accepted Solutions (1)

Accepted Solutions (1)

Answers (0)