View Single Post
  #6  
Old 04-15-2004, 11:20 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

Code:
{* first coloumn *} <TABLE width="100%"><TR><TD valign="top" width="50%"> {section name=cat_num loop=$subcategories start=0 step=2} {math equation="x/2" x=$smarty.section.cat_num.max assign="counter"} {if %cat_num.first%} {if $tmp} [img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img] {/if} <table border=0 width="100%" cellspacing=5><tr> {/if} <td width="50%">{ $subcategories[cat_num].category_name|escape } </td> </tr><tr> { if %cat_num.last% } </tr></table> {/if} {/section} {* 2nd coloumn *} </TD><TD valign="top" width="50%"> {section name=cat_num loop=$subcategories start=1 step=2} {math equation="x/2" x=$smarty.section.cat_num.max assign="counter"} {if %cat_num.first%} {if $tmp} [img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img] {/if} <table border=0 width="100%" cellspacing=5><tr> {/if} <td width="50%">{ $subcategories[cat_num].category_name|escape } </td> </tr><tr> { if %cat_num.last% } </tr></table> {/if} {/section} </TD></TR></TABLE>

Updated, works properly now, I just used two section loops and set the stpes at 2 and 1 so I could create columns and get rid of the is div by 2 that wasn't doing what I needed.

hth.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote