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

layout change

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-17-2011, 06:53 PM
  RedandBlue's Avatar 
RedandBlue RedandBlue is offline
 

Senior Member
  
Join Date: Aug 2009
Posts: 170
 

Exclamation layout change

home.php picks customers/home.tpl
product.php also picks customers/home.tpl

but for products.php no tpl file is associated.

how can i declare a .tpl file for products so that i can design my layout as needed.

thanks
__________________
rbgx
X-Cart 4.3.2
Reply With Quote
  #2  
Old 11-17-2011, 06:59 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: layout change

products.php performs search (with include/search.php) and results are assing to search_result.tpl which calles other tpls...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 11-17-2011, 07:12 PM
  RedandBlue's Avatar 
RedandBlue RedandBlue is offline
 

Senior Member
  
Join Date: Aug 2009
Posts: 170
 

Exclamation Re: layout change

i have created a categories.tpl and i want this layout to be applied for only subcategories and products under a category.

How can i do this.

any help?

Quote:
Originally Posted by cflsystems
products.php performs search (with include/search.php) and results are assing to search_result.tpl which calles other tpls...
__________________
rbgx
X-Cart 4.3.2
Reply With Quote
  #4  
Old 11-17-2011, 07:34 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: layout change

Use an if statement something like

{if $cat eq 'xxx'}
{include file=" yyy.tpl"}
{else}
{include file="zzz.tpl"}
{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 11-19-2011, 09:25 PM
  RedandBlue's Avatar 
RedandBlue RedandBlue is offline
 

Senior Member
  
Join Date: Aug 2009
Posts: 170
 

Exclamation Re: layout change

should i add this in home.php ?

and how can i make this work for all categories not for one category
__________________
rbgx
X-Cart 4.3.2
Reply With Quote
  #6  
Old 11-20-2011, 08:12 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: layout change

Use it in the template that calls the template you want to replace and you can use it for any category. webmaster mode will tell you which template
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
RedandBlue (11-20-2011)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:21 AM.

   

 
X-Cart forums © 2001-2020