Hello,
We noticed that when a page has a redirect set viap page properties) and you try to edit the page in AEM you will see that the targeted page opens and not the actual page you want to edit in the structure.
Is this a feature added in a recent service pack? I could not find anything in the release notes for this. Is there a way to open the actual page without having to remove the redirect in the page properties first?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
This behaviour exists for the core page component. I'm not sure what is the behaviour in case of foundation page component. However if you want to change this behaviour you can overlay the redirect.html or change the condition how it is called in page.html (/apps/core/wcm/components/page/v2/page/page.html).
Below is the condition that is currently present in core v2 page component.
<sly data-sly-test.isRedirectPage="${page.redirectTarget && (wcmmode.edit || wcmmode.preview)}"
data-sly-call="${redirect.redirect @ redirectTarget = page.redirectTarget}"></sly>
<sly data-sly-test="${!isRedirectPage}">
<sly data-sly-include="body.skiptomaincontent.html"></sly>
<sly data-sly-include="body.socialmedia_begin.html"></sly>
<sly data-sly-include="body.html"></sly>
<sly data-sly-call="${footer.footer @ page = page, pwa = pwa}"></sly>
<sly data-sly-include="body.socialmedia_end.html"></sly>
</sly>
Thanks
This behaviour exists for the core page component. I'm not sure what is the behaviour in case of foundation page component. However if you want to change this behaviour you can overlay the redirect.html or change the condition how it is called in page.html (/apps/core/wcm/components/page/v2/page/page.html).
Below is the condition that is currently present in core v2 page component.
<sly data-sly-test.isRedirectPage="${page.redirectTarget && (wcmmode.edit || wcmmode.preview)}"
data-sly-call="${redirect.redirect @ redirectTarget = page.redirectTarget}"></sly>
<sly data-sly-test="${!isRedirectPage}">
<sly data-sly-include="body.skiptomaincontent.html"></sly>
<sly data-sly-include="body.socialmedia_begin.html"></sly>
<sly data-sly-include="body.html"></sly>
<sly data-sly-call="${footer.footer @ page = page, pwa = pwa}"></sly>
<sly data-sly-include="body.socialmedia_end.html"></sly>
</sly>
Thanks
Hi @J_Verschueren ,
You can explicitly stop the redirection by adding the condition if the wcmmode is edit or preview and I think the code given by @JeevanRaj should work in that case.
Thanks.
Views
Likes
Replies
Views
Likes
Replies