View Single Post
  #1  
Old 07-28-2003, 10:14 AM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default Loop any Section

Greetings,
I am trying to figure out how to get a section to display without there having to be a value for cat.

E.g. if I have this in a template (home.tpl):

Code:
{section name=product loop=$products} {$products[product].productcode} {$products[product].productid} {/section}

and I go to http://mystore.com/x-cart/customer/home.php?cat=123

Its going to loop $products.productcode & $products.productid for everything in Category #123.

Is there a way I can have it loop any section I want instead of the example above?

Like:

Code:
{section cat=142 name=product loop=$products} {$products[product].productcode} {$products[product].productid} {/section}

Code:
{section cat=156 name=product loop=$products} {$products[product].productcode} {$products[product].productid} {/section}

and it will loop categories 142, 156.

Possible?
Reply With Quote