![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
CS Guru
Join Date: Sep 2008
Location: Orlando, FL
Posts: 413
|
I am using the following mod to load different template files based on what category is chosen. I thought it might be beneficial to others:
In content.tpl Code:
{if $content == "categories" || $content == "category_products"}
{if $category_data.category_id == "26" || $category_data.category_id == "20" || $category_data.category_id == "36" || $category_data.category_id == "27" || $category_data.category_id == "37" || $category_data.category_id == "43" || $category_data.category_id == "42" || $category_data.category_id == "7"}
{include file="categories_pages/categories2.tpl"}
{else}
{include file="categories_pages/categories.tpl"}
{/if}
Last edited by Triplets : 12-17-2008 at 02:32 AM. |
|
|
|
|
|
#2 |
|
Senior Member
CS Guru
Join Date: Sep 2008
Location: Orlando, FL
Posts: 413
|
You can do the same thing to load a different template for a product:
In content.tpl Code:
{elseif $content == "product_details"}
{if $product.product_code=="RTN"}
{include file="products_pages/product_details_labels.tpl"}
{elseif $product.product_code=="ANN"}
{include file="products_pages/product_details2_hidden.tpl"}
{elseif $product.product_code=="ANN45"}
{include file="products_pages/product_details_sonanddaughter.tpl"}
{elseif $product.main_category == "26" || $product.main_category == "20" || $product.main_category == "36" || $product.main_category == "27" || $product.main_category == "37" || $product.main_category == "43" || $product.main_category == "42" || $product.main_category == "7"}
{include file="products_pages/product_details2.tpl"}
{else}
{include file="products_pages/product_details.tpl"}
{/if}
|
|
|
|
|
|
#3 |
|
Senior Member
CS Guru
Join Date: Nov 2006
Location: Cleveland
Posts: 1,033
|
Thanks triplets...
I was close, but missed the mark this did the trick I appreciate it
__________________
Seamlessly Upgraded to 1.3.5sp4 from 1.3.4sp3 Live: Playboy Collectors Gallery (Adult) LOOKING FOR A FEW COPIES OF THE NEW LITHUANIA PLAYBOY ISSUES...AND COLOMBIA ISSUES..... FEEL FREE TO Private Message Me....THANKS Slightly Modded Default Red | Zardos Lightbox | Sitemap | Multicards Payment Mod | Cart & Checkout Pages Modified | |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Template Editor | doddles | v1.x Configuration | 2 | 11-29-2007 07:11 PM |
| debugging template | jayzee | General Questions | 3 | 11-14-2007 04:41 PM |
| if/else template help | bpaulette | General Questions | 2 | 05-22-2007 09:50 PM |
| Template Help | JosiahW | v1.x Configuration | 1 | 12-16-2006 12:32 AM |