iftomkins
10 years agoMaven
Get URL of the previous page in the page initialization tab
I'm trying to get the URL of the previous page the user was on. Any way to do this works. I could possibly add a "return" parameter onto the URL before the user leaves the first page, in which case, I'd like to know how to get the value of a query variable. Otherwise, accessing the previous URL directly would be ideal. Here's the basic idea:
<#if page.name?lower_case == "postpage" && page.interactionStyle == 'idea'>
<#-- IF PREVIOUS URL contains /idb-p/features -->
DO NOT REDIRECT
<#-- ELSE -->
<#-- Redirect -->
${http.response.setRedirectUrl("/t5/Feature-Requests/idb-p/features")}
<# END IF -->
</#if>
Hi iftomkins
what about accessing the HTTP Referrer from the HTTP request context object
${http.request.referrer}
This should do the trick I think
Thanks,