View Single Post
  #2  
Old 03-25-2004, 01:29 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

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

Default

Little late but here is the code for this in 3.5.x:

Code:
{* divide subcategories into 2 columns www.cart-lab.com written for 3.5.x *} { include file="location.tpl" } {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} { include file="customer/main/navigation.tpl" } {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description|regex_replace:"/[\n]/":" "} {/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {section name=cat_num loop=$subcategories start=1} {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%"><font class="ItemsList">{ $subcategories[cat_num].category_name|escape }</font> </td> {if %cat_num.index% is div by 2}</tr><tr>{/if} {* <td align=right nowrap><font class=Text> {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} { $subcategories[cat_num].product_count } {$lng.lbl_products} {elseif $subcategories[cat_num].subcategory_count} { $subcategories[cat_num].subcategory_count } {$lng.lbl_categories|lower} {/if} {/if} </font></td> </tr> *} { if %cat_num.last% } </tr></table> {/if} {/section} {if $tmp and $products ne "" } <br clear=_all><hr size=1 noshade> {/if} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category_name|regex_replace:"/.*\//":"" content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" }
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote