Gossamer Forum
Home : Products : Gossamer Links : Discussions :

New user - How to display an icon next to category name

Quote Reply
New user - How to display an icon next to category name
Hello

I am a new user to Links SQL2.0.5 version. This might be a simple question. I would like to display an icon either next to or in place of the category name in the home page. I just see that the categories are coming from <%category%> probably some kind of 'sub-routine'. Is this possible, how? Thank you in advance.

-Srinivas

Quote Reply
Re: [srinivas] New user - How to display an icon next to category name In reply to
You could simply add a new field in the category definitions (see the manulon how to do this), and call it something like "cat_image". Then when you createa category you put in a URL to the image. Then in subcategory.html add the field<%cat_image%> where you want the image to appear on your categories.

Hope i made it clear enough for you Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] New user - How to display an icon next to category name In reply to
Or you could just use:

<img src="<%build_image_url%>/default/<%Name%>.gif">

Cool

That should work I think.
Quote Reply
Re: [srinivas] New user - How to display an icon next to category name In reply to
Hello, srinivas.

The better codes to use would be:

Quote:

<%if cat_image%>
<img src="<%build_image_url%>/default/<%CategoryID%>.gif" alt="<%Name%>" width="insertvalue" height="insertvalue" border="0">
<%endif%>


Using the PRIMARY key in the Category table is better since that will stay the same over time. If you use <%Name%>.gif, then if you edit the CATEGORY Name column, then you will also have to edit the category image file name.

========================================
Buh Bye!

Cheers,
Me

Last edited by:

Heckler: Dec 20, 2001, 7:50 PM