| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
Passing users screen resolution through as a variable | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
I need users screen width as a variable in an tpl file.
FI. {if $var eq "1024"}Do This{else}DO THAT{/if} Can this be done? |
|||||||
|
#2
|
|||||||
|
|||||||
|
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
#3
|
|||||||
|
|||||||
|
hi balinor,
I know, but how do it pass the javascript var through to smarty (as a smarty var) |
|||||||
|
#4
|
|||||||
|
|||||||
|
According to the documentation you should be able to pass this to the script...
Code:
Then what I would do is right above this line in home.php Code:
I might write something like this: Code:
Then you should be able to use... {if $res eq 'high'} Some Code Here {else} Some More code Here {/if} |
|||||||
|
#5
|
|||||||
|
|||||||
|
thanks,
i will try it later today.... |
|||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||