X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Horizontal Sub Category (https://forum.x-cart.com/showthread.php?t=21178)

jeeya 04-17-2006 10:31 PM

Horizontal Sub Category
 
Hello,
I tried following code to list subcategories in horizontal instead vertical.

Code:

{if $subcategories}
<TABLE border="0" cellspacing="5" width="100%">
{foreach from=$subcategories item=subcat}
<Td>
{if $tmp and $first_subcat ne "Y"}
        <TD valign="top" rowspan="{count value=$subcategories print="Y"}">[img]{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}[/img]</TD>
{assign var="first_subcat" value="Y"}
{/if}
        <TD align="left" width="95%"><FONT class="ItemsList">{ $subcat.category|escape }</FONT>
</TD>
        <TD align="left" 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>
</Td>
{/foreach}
</TABLE>
{/if}




It does show it them horizontal, only thing I am not able to figure out is -


Category 1-----space----- category 2-----category 3-----category 4


It shows lot of space between category 1 and category 2.

Any Idea how to fix it? thanks

balinor 04-18-2006 03:08 AM

Moving to template editing.

cotc2001 05-23-2006 01:45 AM

Im trying to do the exact same thing today - did you figure it out???

jeeya 05-23-2006 03:10 AM

no... didn't try much after that.

may be placing code out side table might work.

cotc2001 05-23-2006 03:12 AM

k, just getting x-cart to look at it for me (support points are handy things :D )


All times are GMT -8. The time now is 03:00 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.