View Single Post
  #133  
Old 06-29-2006, 08:50 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default

This is a great mod! I've got an idea for an addition and two questions:

First, I've made the Icon/Category one link, instead of two on top of each other... no big deal. I've also added a title tag to the link, though, so when someone hovers, there can be text... this seems like it should be good for adding keyword density to the link. The problem is, I can't find the smarty tag for the category description, which is, in my opinion, highly appropriate for the title tag. If you can tell me the tag, I'd be very grateful.

Second, when a category has no products, there is nothing beneath the Category name. Is there a way for it to say "0 Items" instead of it being blank?

Here's my subcategories.tpl:

Code:
{* $Id: subcategories.tpl,v 1.43.2.2 2004/10/07 07:08:51 max Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {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} {* ==================== Sub categories mod start *} {section name=cat_num loop=$subcategories} { if %cat_num.first% } <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> {/if} { if %cat_num.index% is div by 2} <tr> {/if} <td align="center" valign="top"> <a title="Alternate Text" href="home.php?cat={ $subcategories[cat_num].categoryid }"> [img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img] <font size="3">{ $subcategories[cat_num].category|escape } </font></a> { $subcategories[cat_num].description|escape } {if $config.Appearance.count_products eq "Y"} {if $subcategories[cat_num].product_count} ({ $subcategories[cat_num].product_count } Items) {elseif $subcategories[cat_num].subcategory_count} ({ $subcategories[cat_num].subcategory_count } Subcategories) {/if} {/if} </td> { if %cat_num.last% } </tr> </table> {/if} {/section} {* ==================== Sub categories mod end *} {if $tmp and $products ne "" } <BR clear="left"> <HR size="1" noshade> {/if} {if $products} {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_man} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category 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" }

Jeremy
__________________
Version 4.0.17/4.0.18
Reply With Quote