Help - Search - Members - Calendar
Full Version: category icon in archives
Movable Type Community Forum > Additional Resources > Tips and Tricks
xxAxel1xx
Do you have any entries in multiple categories?  That could be the problem.
kadyellebee
Try using this:

CODE
<MTArchiveList><MTEntries>
 <MTEntryCategories>
   <img src="/images/rambling/<$MTCategoryLabel$>-sm.gif" border=0>
  </MTEntryCategories>
  <a href="<$MTEntryLink$>"><$MTEntryTitle$></a>:
    <$MTEntryExcerpt$> ... <br />
</MTEntries></MTArchiveList>


I didn't have time right now to try it out myself, so I'll come back later and check to see if it worked for you smile.gif

Kristine
kadyellebee
I'm glad it worked!! smile.gif

I had a php thing to do this (and add commas between multiple categories) in my blog, and so I had to think about it because I wasn't using just the easy way for listing categories!!

Kristine
yellowX
I'm trying to implement a "category icon" so that depending on what category an entry is, a different icon is displayed - I have large icons for the main journal page and smaller icons for the archive listings - however, on trying to implement this on my main archives page, I've had problems with the category causing the listings to repeat ...

Here's the code I'm using:
QUOTE
<MTArchiveList>
 <MTCategories>
   <MTEntries>
   <div>
     <img src="/images/rambling/<$MTCategoryLabel$>-sm.gif" >
     <a href="<$MTEntryLink$>"><$MTEntryTitle$></a>:
     <$MTEntryExcerpt$> ... <br />
   </div>
   <br />
   </MTEntries>
 </MTCategories>
</MTArchiveList>


And here's the URL with the resulting page:
http://www.desine.net/rambling/archives/

I've tried moving the MTCategories and MTEntries tags around in several other ways, but couldn't get it to display an entry with a single corresponding icon next to it. The closest I got was when I put MTCategories around the <img> tag, but that just repeated all the icons for each entry to the left of each entry.

(Just in case, you need it, the homepage for the journal is at: http://www.desine.net/rambling/ instead of the old Greymatter journal listed in the navigation bar.)
yellowX
Nope, every single entry is attributed to a single category - the way I have categories set up, I don't plan on having any entries span multiple categories smile.gif
yellowX
Awesome!! That worked ... Thanks sooooo much smile.gif I didn't realize that there was a difference between MTCategories and MTEntryCategories ... need to pay more attention to the user manual next time smile.gif Now back to customizing the templates - still got quite a bit to do ohmy.gif)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.