[TYPO3-dev] typoscript rendering: setting cookie and reading during runtime not working?

Simon Schaufelberger (Schaufi) simonschaufi at jesus.de
Wed Jan 2 02:05:18 CET 2013


happy and blessed new year! this is the first post in the new year ;)

i thought i have some understanding about typoscript rendering but now i 
am really stuck.

what i want is: set a cookie at typoscript runtime and read it later in 
a condition and render a different page output if its there.

Problem: the condition is only true after reloading the page.

Why is this code not doing what i want?

in the userfunction i just call setCookie...

page = PAGE

[globalVar = _COOKIE|myCookie =]
includeLibs.setCookie = fileadmin/setCookie.php
page {
	1 = USER
	1 {
		userFunc = user_setCookie
	}
}
[end]

[globalVar = _COOKIE|myCookie = 1]
page {
	2 = TEXT
	2.value = cookie is there
}
[end]
-- 
Regards, Schaufi



More information about the TYPO3-dev mailing list