View previous topic :: View next topic |
Author |
Message |
Xanthis
Joined: 09 Dec 2003 Posts: 2
|
Posted: Tue Dec 09, 2003 1:56 pm Post subject: Categories List & Image Help |
|
|
Hi All... Long time stalker of the forums, first time poster. Most of the time I can search and find the answer to my problems... I've tried looking for the answer to this one, but alas I'm blind and it's fairly late so I'm getting a bit thin. Sorry if this post is else where but I couldn't find it!
getting to the point...here's my question I need help on:
I have my categories listing in ID order, all looking nice in the text links.
Is there a way to add a image, like a bullet, that also links to the category, just before the categories name?
Example:
Cat 1
Cat 2
I'm thinking i've gotta do something with this code:
Code: | <?php list_cats(0, 'All', 'ID'); ?> |
but honestly i'm stumped.
Any help, i would be really greatful  |
|
Back to top |
|
 |
yann
Joined: 05 Dec 2003 Posts: 10 Location: London
|
Posted: Tue Dec 09, 2003 3:14 pm Post subject: |
|
|
Hi,
Edit the function list_cats in the file b2-include/b2template.functions.php. Replace
Code: |
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all">'.$all."</a><br />\n";
|
by something like this
Code: | echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.'all"><img src="b2-img/bullet.gif" border="0" />'.$all."</a><br />\n";
|
and
Code: |
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'">';
|
by something like that
Code: |
echo "\t<a href=\"".$file.$querystring_start.'cat'.$querystring_equal.$row->cat_ID.'"><img src="b2-img/bullet.gif" border="0" />';
|
where bullet.gif if your picture. I hope it helps... |
|
Back to top |
|
 |
Xanthis
Joined: 09 Dec 2003 Posts: 2
|
Posted: Tue Dec 09, 2003 9:21 pm Post subject: |
|
|
Many Thanks. I thought it would end up being something that took 2 seconds.
Thanks again for you help. |
|
Back to top |
|
 |
|