| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
other skin dir depending on user | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
Is it possible to change the skindir location on the fly depending on the type of user.
Like: if user = eq "something" In smarty.php this is in. $smarty->template_dir = $xcart_dir."/skin1"; $smarty->compile_dir = $var_dirs["templates_c"]; $smarty->config_dir = $xcart_dir."/skin1"; $smarty->cache_dir = $var_dirs["cache"]; $smarty->secure_dir = $xcart_dir."/skin1"; $smarty->debug_tpl = "file:debug_templates.tpl"; $smarty->assign("ImagesDir",$xcart_web_dir."/skin1/images"); $smarty->assign("SkinDir",$xcart_web_dir."/skin1"); Thnx |
|||||||
|
#2
|
|||||||
|
|||||||
|
What are you trying to achieve, just showing a different skin for each usertype?
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
#3
|
|||||||
|
|||||||
|
Yes thats what i want.
Better if it would work with different membership levels..... thnx |
|||||||
|
#4
|
|||||||
|
|||||||
|
Then just use an {if} statement in customer/home.tpl on the line that controls which skin is displayed. No need to change the whole skin directory:
{if $usertype eq "C"} <LINK rel="stylesheet" href="{$SkinDir}/skin1.css"> {else} <LINK rel="stylesheet" href="{$SkinDir}/skin2.css"> {/if} Check the sticky thread on {if} statements for membership level statements.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
![]() |
|
| Thread Tools | Search this Thread |
|
|
|
|
|||
|
X-Cart forums © 2001-2020
|
|||