Re: Mod for subcategories in columns with descriptions and icons
mrkenzie post #137 does indeed work with v4.1.7. Thank you!
When checking the html output it seems that the table cells are not closed ie: <td>subcategory icon <td>subcategory icon etc. with no closing </td> tags. Anyone know where/how to fix this?
FIXED:
code: subcategories.tpl:
_________________________________________________
{if $subcategories}
<table cellspacing="5" width="100%" border="0">
<tr>
{foreach from=$subcategories item=subcat}
{if $tmp is div by 3}
</tr><tr><td colspan="3"></td></tr><tr valign="top">
{/if}
{ if $tmp and $first_subcat ne "Y" }
{assign var="tmp" value=0}
{assign var="first_subcat" value="Y"}
{/if}
<td class="ColumnTitles" valign="top"><a title="{$subcat.description}" href="home.php?cat={ $subcat.categoryid }"><font class="ItemsList">{ $subcat.category|escape }</font><br /><img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="" />
</a></td>
{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}
{else} 0 Products
{/if}
{/if}
{assign var="tmp" value=$tmp+1}
{/foreach}
</tr></table>
{/if}
__________________________________________________ ____
__________________
maineiac
x-cart gold v4.0.18
x-cart gold v4.1.8
Last edited by maineiac : 06-05-2007 at 05:54 AM.
Reason: resolved
|