View Single Post
  #2  
Old 10-16-2006, 08:25 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default Re: $main variable... where is it, and how can I use it?

$main is a smarty variable that is assigned in a PHP file. For example...your product.php page has a variable of 'product'. Look for this in the PHP file

PHP Code:
$main "product";
$smarty->assign("main",$main); 

or

PHP Code:
$smarty->assign ("main""product"); 

You can then use an {if} {else} statement to load different templates.

For example:

HTML Code:
{if $main eq 'product'} {include file="skin1/customer/main/product.tpl"} {else} {include file="skin1/different.tpl"}
Reply With Quote