Forum Discussion
- sunny_modyAdvisor
hi navya_0204
maybe writing redirects in Page Initialization section in Studio might help
you might find some help in the following article
https://community.khoros.com/t5/Developer-Knowledge-Base/Using-a-FreeMarker-Page-Initialization-Script/ta-p/125767- navya_0204Helper
Thank you sunny_mody
I went through the documentation and here is my code
<#if page.name == "Enrollment "> ${http.response.setRedirectUrl(t5/Support-Case-Chat/ct-p/SupportCaseChat)}
</#if>
but the above code is not working can anyone let me know whats the issue
Thank you!!
- snaffleExpert
As far as I know this will only work with built-in Lithium pages, such as "CommunityPage", "ForumPage", "ForumTopicPage" etc - you can find the page name by looking at the classes applied to the body tag.
I don't know of any page called simply "Enrollment" and having a look on our community, couldn't find one in the Pages area so I suspect that's part of your problem.
Additional though, you'll want to use the "tapestryPrefix" variable in your redirect url and not use /t5/ in the path... so:
<#if page.name == "CommunityPage"> ${http.response.setRedirectUrl("${community.urls.tapestryPrefix}/Support-Case-Chat/ct-p/SupportCaseChat")} </#if>
Hope that helps.
Related Content
- 11 months ago