[TYPO3-english] How to store HTTP_REFERER in session
bernd wilke
t3ng at bernd-wilke.net
Mon Jul 29 08:37:34 CEST 2013
Am 27.07.13 15:57, schrieb Morten Kjems:
> Hi I want to store the HTTP_REFERER in a session so I can display
> content based on where the user came from before visiting my site.
>
> I found the handy extension 'Session' that lets you store values in a
> session.
>
> http://typo3.org/extensions/repository/view/session
>
> If I store a static value like below there is no problem and I can
> output the value and create conditions based on it.
>
>
> page.20 < lib.setSessionVar
> page.20.userFunc {
> name = referer
> value = staticvalue
> }
>
>
> But when I try to store the HTTP_REFERER like below. Then my entire page
> rendering is broken.
>
>
> page.20 < lib.setSessionVar
> page.20.userFunc {
> name = referer
> value = TEXT
> value.data = getenv:HTTP_REFERER
> }
>
> What am I doing wrong?
you propably miss to stdWrap your value inside your userFunc.
$value = $this->cObj->cObjGetSingle($conf['value'], $conf['value.']);
otherwise the key 'value' may be misinterpreted as it is a valid
attribute of TEXT object.
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list