AndyB
Well-known member
I would like to see if the $session.userAgent variable contains the word "iPad".
Currently I have the following code in the PAGE_CONTAINER template and it works fine:
How would I use xen:string or xen:helper or any other command to get part of the $session.userAgent variable?
Thank you.
Currently I have the following code in the PAGE_CONTAINER template and it works fine:
Code:
<xen:if is="{$session.userAgent} == 'Mozilla/5.0 (iPad; CPU OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53'">
<xen:comment>ipad</xen:comment>
<xen:else />
<xen:include template="page_container_js_head" />
</xen:if>
How would I use xen:string or xen:helper or any other command to get part of the $session.userAgent variable?
Thank you.
Last edited: