Originally Posted by
tmikk
Vera, I wonder how this turned out for you? I have a need to display an image next a main category menu item and would be interested in learning from your experience.
I think I know what you mean.
To my knowledge there would be 2 options.
1. CSS :after
If you categories have a css class, you could always use the element:after like..
Code:
h1:after {content:url(smiley.gif);}
but if you have a lot of categories this may not be the best option due to amount of css code required.
2. Edit the template. Like Vera has mentioned, having images the same name as the category would be the way to go.
Edit a custom Nav template and where it displays
Code:
<?php echo $item['link'] ?>
change it for something like
Code:
<?php echo $item['link'] ?> [img]tl_files/website/<?php echo $item['link'] ?>.jpg[/img]
Name all the images the same as the category name and that should sort you out.
You could place the image after the closing </a> if you didn't want it to be part of the link.
BTW. I haven't tested this with submenu items
I'm using a similar method for a menu made up of images.
Hope that helps and covers what you wanted.
Bookmarks