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

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

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can develop very powerful custom resource types that you can drop into a component dialog. This is done via JS. We have an example of creating a custom resource type here: Adobe Experience Manager Help | Creating a custom Experience Manager 6.4 sling:resourceType for Touc...

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can develop very powerful custom resource types that you can drop into a component dialog. This is done via JS. We have an example of creating a custom resource type here: Adobe Experience Manager Help | Creating a custom Experience Manager 6.4 sling:resourceType for Touc...