Expand my Community achievements bar.

How to get the parent page in the code if there is a redirect :/

Avatar

Level 2

Hey folks! I encountered a scenario where I needed to grant authors the ability to create cookies at the page level. To achieve this, I added a new tab to the page alongside existing tabs like 'Advanced,' etc. Authors can input cookie names and values, and everything works as expected until a redirect is added. At that point, the code starts fetching the redirect page instead of the original parent page, hindering the cookie setup. I observed that the parent page has a property called cq:redirectTarget containing the redirect URL. However, I'm unsure how to retrieve the parent page in my code instead of the redirect page so I can setup the cookie. Any assistance would be greatly appreciated. Thank you!

0 Replies