snaffle
11 years agoExpert
Pass referrer url from page initilization script to custom component
Hi,
I'm trying to work out how to capture a referring url in the Page Initialization script and forward it on to a custom component.
At this stage I have the following code in the Page Initialization script where I'm trying to set the referrer as a session attribute:
<#assign referrerUrl = http.request.referrer /> ${http.session.setAttribute("forwardUrl", referrerUrl)}
And in the custom component, trying to retrieve the information I have:
${http.session.attributes.name.get("forwardUrl", referrerUrl)}
and all I get is "This widget could not be displayed."
This might be completely the wrong way to go about it so I'd love some suggestions or advice on how best to go about this.
Thanks
Nathan