View Single Post
  #19  
Old 01-28-2005, 10:30 AM
 
steveparks steveparks is offline
 

Advanced Member
  
Join Date: Jan 2003
Location: UK
Posts: 87
 

Default Images instead of text

Hi Aaron

What you want is possible.

In the code I posted above, look for:

Code:
{section name=cat_num loop=$categories} {if $categories[cat_num].order_by lt 10} {if $cat eq $categories[cat_num].categoryid} <TD align="center" class="tabmenuitemon" nowrap><span>{$categories[cat_num].category}</span> </TD> {else} <TD align="center" class="tabmenuitem" nowrap><span>{$categories[cat_num].category}</span> </TD>

Then within each of the two TD tags, you will see:
Code:
{$categories[cat_num].category}

Change this (in both cases) to be:
Code:
[img]/CatIcons/{$categories[cat_num].category}.gif[/img]

Then create icons with exactly the same names as your categories, in a folder called CatIcons in the root directory. You can of course choose to use a Smarty variable to give the directory, and this would be best practice, but i use the directory above to illustrate.

You can also change what the images are called, so you could use categoryid or order_by or similar by changing the code above and the image name.

You can even tweak the code to have different images for whether a category is active or not.

cheers
steve
__________________
--------------
RHEL3/Apache2/PHP4/MySQL4/Plesk7.5.3
X-Cart 4.0.16 - Live
X-Affiliate
X-AOM
ez-checkout
ez-upsell
--------------
Reply With Quote