View Single Post
  #12  
Old 02-19-2007, 07:29 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: can different product templates be used?

yes, you can easily have different product (and/or category) template layouts ona per-product or per-category basis.

It has NOTHING to do with "linking". You probably shouldn't use that terminology, as it will confuse the issue.

You have 2 ways to do this:

1. use if/else statements, as suggested by Padraic
2. use the mod(s) from websiteCM.

If you want to see how the if/else in products.tpl work, on a very basic way, on my site I have 2 different products_t.tpl variations... all are determined by an if/else in products.tpl. Some products are displayed with a 2-up category page, some with 3, some just use the default products listing.
Code:
{if $usertype eq "C" and $cat eq "20" or $cat eq "11" or $cat eq "3" or $cat eq "1" } {include file="customer/main/products_t2.tpl" products=$products} {elseif $usertype eq "C" and $cat ne "17" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")} {include file="customer/main/products_t.tpl" products=$products} {else} {if $products}

This is for CATEGORY pages -- but it all works the same way... this is a VERY simple way to implement this. You can make it much more complicated as your store requires.

The thread Padraic suggested is a great start.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote