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

Why are templates shared?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-26-2007, 07:38 AM
 
joeph joeph is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 35
 

Default Why are templates shared?

Hi all,

I am studying the way the smarty templates are organised.
Why on earth do the customer and admin site share the same template files? For me it does not make any sense!

Thanks, Joep
__________________
Version info:
X-cart V4.1.9 / V4.2
Development: Windows
Production: Linux

CompuBase
Reply With Quote
  #2  
Old 02-26-2007, 07:40 AM
 
balinor balinor is offline
 

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

Default Re: Why are templates shared?

Nope, it doesn't I have created admin-only copies of each of the shared templates in my core installation package.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-26-2007, 08:06 AM
 
joeph joeph is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 35
 

Default Re: Why are templates shared?

Thanks for your quick reply!!!
Of course I can do the {if $usertype eq "C"} stuff (from your excellent page http://forum.x-cart.com/viewtopic.php?t=28546).

How did you manage to create the different template pages for both front ends?

Cheers, Joep
__________________
Version info:
X-cart V4.1.9 / V4.2
Development: Windows
Production: Linux

CompuBase
Reply With Quote
  #4  
Old 02-26-2007, 08:09 AM
 
balinor balinor is offline
 

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

Default Re: Why are templates shared?

I use the {if $usertype... for the menu and dialog boxes, but it is easier just to create a different head template (head_admin.tpl). Just duplicate your head.tpl and then open up single/home.tpl and change head.tpl to head_admin.tpl.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 02-26-2007, 11:22 PM
 
joeph joeph is offline
 

Advanced Member
  
Join Date: Nov 2006
Posts: 35
 

Default Re: Why are templates shared?

Thanks, you pointed me to the right direction.
Maybe your info is outdated ? In single/home.tpl there is only a link to head_admin.tpl and not to head.tpl.

Joep
__________________
Version info:
X-cart V4.1.9 / V4.2
Development: Windows
Production: Linux

CompuBase
Reply With Quote
  #6  
Old 02-27-2007, 03:10 AM
 
balinor balinor is offline
 

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

Default Re: Why are templates shared?

Ah, yea, in 4.1 they updated a few things.
__________________
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:02 PM.

   

 
X-Cart forums © 2001-2020