Expand my Community achievements bar.

Vanity Url Individual sling:redirect checkbox in dialog

Avatar

Level 2

Every vanity-URL should get the possibility to be redirected by this checkbox individually

6 Replies

Avatar

Level 10

Hi Mayuri,

Can you provide the steps which you are trying, so that we can reproduce and find the issue, actually your question is not clear.

Thanks,

Ratna.

Avatar

Level 2

Hi Ratna

in below screen I have single checkbox for page redirect after entering vanity urls .

Instead of it I am trying to get individual checkbox for each vanityurl

1. vanityurl : /vanity1

checkbox for Redirect Vanity URL :checked

2.

vanityurl : /vanity2

checkbox for Redirect Vanity URL :unchecked

etc

1386499_pastedImage_0.png

Avatar

Level 10

You can add always more fields, Add a checkbox filed in your project page component here

page/cq:dialog/content/items/tabs/items/basic/items/column/items/vanityurl/items/vanitypath

Avatar

Level 2

VAnity logic of redirecting page url not working after adding checkbox like you suggested

Avatar

Level 10

The change I suggested, will only show the checkbox not logic.

In order to have that logic, probably you need to modify org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl. Though I won't support modifying it

What you can do it, have a JS logic in place with dialog.

Keep only the working url of page in same property (vanity path) but maintain a list of all url + check box status in a property under same node.

Not sure, if that's the best way but only I see for now.