![]() |
Breakup Subcategories
How can I separate subcategories into multiple columns? IБ─≥ve searched the forum and found a few related topics but none seem to work??? Any help is greatly appreciated!
|
You are wanting the sub category listings to be in 2 or 3 columns correct?
|
Correct, I am wanting the sub category listings to be in 2 columns.
|
Try something like for a two column list in subcategories.tpl:
Code:
{section name=cat_num loop=$subcategories} |
Hello,
Thanks for posting the code it pointed me in the right direction, but I am trying to split them into 3 or 4 columns. I tried using the {if $smarty.section.cat_num.index is div by 3} but since the index starts with a 0 and 0 is divisible by 3 it inserts <tr></tr> after the first category, so the table looks like this cat0 cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 etc. I would realy appreciate any help. Thanks |
multiple columbs in version 4 xcart
have you ever changed this in the version 4 xcart? the code is set up a bit different. I was able to use this code in the last store I used but the new version subcategories.ypl has this code instead:
{section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {if $subcategories} <TABLE border="0" cellspacing="5"> {foreach from=$subcategories item=subcat} <TR> <TD align="center" nowrap width="95%"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcat.categoryid}[/img] <FONT class="ItemsList">{ $subcat.category|escape }</FONT> </TD> <TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</FONT></TD> </TR> {/foreach} </TABLE> {/if} |
|
All times are GMT -8. The time now is 11:44 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.