[TYPO3-dev] Output value of device and useragent : newbie question
Bernhard Kraft
kraftb at think-open.at
Mon Feb 15 16:22:15 CET 2010
Éric Thibault wrote:
> data = {global : device} #not working either with useragent
Hello !
You can't output the user agent like this. You could do:
data = getIndpEnv:HTTP_USER_AGENT
But it will simply output the full http user agent. I guess you read
about "useragnet" and "device" in the conditions section of TSref. Now
you should note that "conditions" are the stuff you can put into
rectangular brackets like:
[device = ipod]
... such things should work (I guess iPod is currently no valid value..)
but you can't use those "device" strings somewhere else except for
conditions. what you could do is make a condition for every device you
support:
temp.myDevice = TEXT
[device = noki]
temp.myDevice.value = Nokia
[device = eric]
temp.myDevice.value = Ericson
[device = wap]
temp.myDevice.value = WAP
[else]
temp.myDevice.value = Some other device
[end]
... this would of course work and you could extend it to any supported
detectable device as listed in:
"t3lib/utility/class.t3lib_utility_client.php"
greets,
Bernhard
More information about the TYPO3-dev
mailing list