Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Parts of bottom.tpl to react differently when in admin

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-27-2006, 03:14 PM
 
jherzog jherzog is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 93
 

Default Parts of bottom.tpl to react differently when in admin

so I Have added code to my bottom.tpl but I need it to act differently depending on if the viewer is a customer or an admin.

My first idea was that the head.tpl and head_admin.tpl file switches between these modes. So I defined a variable in head_admin.tpl and then an if statement looking for that variable in bottom.tpl. However I just found out that with smarty you can't do this (define a variable in one tpl and have it be there when the other tpl loads).

So is there another way you can suggest? Is there a variable or setting that I can test for in bottom.tpl to see if I am an admin or customer?

Thanks
Jed
__________________
Jed Herzog
Gold X-Cart 4.0.17
http://www.outliersolutions.com
Portland Advertising Agency,
Portland Web Design
Reply With Quote
  #2  
Old 03-27-2006, 03:21 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

{if $usertype eq "C"}

display 1

{else}

display 2

{/if}

That code will display the first piece if the user is a customer, or the second one if the user is a an admin or provider.

Also, in the future, best to keep with one post instead of starting a new thread on the same subject.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:38 PM.

   

 
X-Cart forums © 2001-2020