I am so close to posting a new mod for a main/root categories page that uses content from a static page and a dynamic listing of root cats, but i don't know how to show the root cat icon.
Basically i took code out of subcategories.tpl and modified it to list root cats then inserted it into an if statement inside pages.tpl that tests if we are on the root cat static page. See moded pages.tpl below:
Code:
{* $Id: pages.tpl,v 1.3.2.1 2005/01/19 06:42:51 max Exp $ *}
{capture name=dialog}
{if $page_content ne ''}
{if $config.General.parse_smarty_tags eq "Y"}
{**Main/Root Categories Page mod. Replace the page id "9" in the next line of code with the corresponding id of the static page you created for your main categories.**}
{if ($smarty.get.pageid eq "9")}
{$page_content}<br><br>
{if $categories}
{**The code below is extracted from subcategories.tpl and slightly modified so that all references to "sub cats" are changed to "cats".**}
<TABLE border="0" cellspacing="5" width="100%">
{foreach from=$categories item=cat}
<TR>
{if $tmp and $first_cat ne "Y"}
<TD valign="top" rowspan="{count value=$categories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon_url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD>
{assign var="first_cat" value="Y"}
{/if}
<TD align="left" width="95%"> <A href="home.php?cat={ $cat.categoryid }"><FONT class="ItemsList">{ $cat.category|escape }</FONT></A><BR></TD>
<TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"}
{if $cat.product_count}{ $cat.product_count } {$lng.lbl_products}
{elseif $cat.subcategory_count}{ $cat.subcategory_count } {$lng.lbl_categories|lower}
{/if}
{/if}</FONT></TD>
</TR>
{/foreach}
</TABLE>
{/if}
{else}
{eval var=$page_content}
{/if}
{**End Main/Root Categories Page mod.**}
{else}
{$page_content}
{/if}
{/if}
{/capture}
{include file="dialog.tpl" title=$page_data.title content=$smarty.capture.dialog extra="width=100%"}
This line should show the root cat icon but it is still for subcat icon: <TD valign="top" rowspan="{count value=$categories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD>
Any ideas?