Help - Search - Members - Calendar
Full Version: Categories
Movable Type Community Forum > Additional Resources > Tips and Tricks
Gladman
Hi,

I am trying to put category listings by each entry, but cannot figure out how to do it.  I put a few tags in, but get errors saying the categories are not enabled.  I can't find the on/off switch in config.

Please help a newby.
tihea
Silly question, but did you click the Catagories button and name a few catagories to start with? Only asking because I didn't at first and it only took me a week to realize it  :)

Also, could you post what code you're using for the list of catagories? That way if it's a missing tag someone could spot it (not me, although I try to guess I'm still newer than I wish I was!)
Gladman
HI,

Categories are on: I have no code, don't even know tags.  

Want to put the category name near the subject of the message in main index.
tihea
QUOTE
Want to put the category name near the subject of the message in main index.

Ah-ha, gotcha. This is what I have on my main index file -
CODE
<div class="blogbody">
    
<a name="<$MTEntryID pad="1"$>"></a>
<span class="title"><b><$MTEntryTitle$></b></span>
    
<$MTEntryBody$>
    
<MTEntryIfExtended>
<span class="extended"><a href="<$MTEntryLink$>#<$MTEntryID pad="1"$>">MORE...</a></span><br />
</MTEntryIfExtended>
    
<div class="posted"><font size=-2>
<$MTEntryAuthor$> added this on <a href="<$MTEntryLink$>#<$MTEntryID pad="1"$>">
<$MTEntryDate format="%I:%M %p"$></a> <MTDateHeader>
<$MTEntryDate format="%B %d, %Y"$></MTDateHeader> to the <a href="<$MTEntryLink archive_type="Category"$>"><$MTEntryCategory$></a></font size=-2><br>
<b><MTEntryIfAllowComments><a href="<$MTCGIPath$>mt-comments.cgi?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">comments(<$MTEntryCommentCount$>)</a>
</MTEntryIfAllowComments></b><p></p>
</div>    
</font>
</MTEntries>


The part you want is this -
CODE
to the <a href="<$MTEntryLink archive_type="Category"$>"><$MTEntryCategory$></a>

Of course, this is what I have right now, and it may not work right off for you, etc and so forth...
Gladman
added that, get this:

Build error in template 'Main Index': Error in tag: Error in tag: <$MTCategoryArchiveLink$> can be used only if you have enabled Category archives.

can't figure out where to enable the category in setup
tihea
QUOTE
can't figure out where to enable the category in setup

Whoops, forgot that part. Click Blog Config, then Archiving, and check the box next to Catagory Archive, save & rebuild.
glacierlily
Thank you Tihea. I used this on my blog as well.
Cynthia
Gosh this was an easy tweak.  Thanks Tihea!
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.