SuckfulThat's my silly blog. Anyway, I've gone through and assigned all of my entries to categories, and I want to include the category info on each post at the bottom of the post. How do I do that?
Also, I want to add a category listing to the right hand bar, so that the categories are listed there (like the monthly ones are now), and when the reader clicks on the category, he goes to a page where only the items of that category (and secondary category) are listed. How can I do that?
psh - blogging newbie
girlie
Feb 8 2003, 09:29 AM
1. Use <MTEntryCategory> to display the category for each entry.
2. Copy the code for the monthly listing and change <MTArchiveList archive_type="Monthly"> to <MTArchiveList archive_type="Category">.
I have more questions:
1) What tag do I use to display the information in the 'category description'?
I want the sidebar to display: Category (link to category archive) - Category Description
2) How do I get the category at the end of my individual posts to link to the same category archive?
nolageek
Mar 6 2003, 06:30 AM
All of these are in the manual under
Category Related Tags.
MTCategoryArchiveLinkA link to the archive page for this category. This only works if you have enabled Category archiving for your weblog; if you have not, you will get an error message when rebuilding your pages.
MTCategoryDescriptionThe description for this category.
so you would want:
CODE
Category (link to category archive) - Category Description
<$MTCategoryLabel$> (<a href="<$MTCategoryArchiveLink$>">link</a>) - <$MTCategoryDescription$>
or maybe you wanted this:
CODE
Category - Category Description
<a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a> - <$MTCategoryDescription$>
Does that help?
Vincent
Thanks! That definitely solves the first question.
Now, for the second one:
How do I get
my dumb blog's entries to display a link to the Category archive for that posting? At the bottom of my posts, you see:
Posted by (author) to (category)
I'd like that iteration of the entry category link to the archive of that category.
For example, when you click on the category link at the end of
this guy's blog, you are taken to that category page. (His site is in b2, but you get the idea.)
This is my current code:
CODE
<div class="posted"><a href="<$MTEntryPermalink$>">Posted</a> by <$MTEntryAuthor$> to <MTEntryCategory>
psh
maddy
Mar 6 2003, 03:41 PM
CODE
<div class="posted"><a href="<$MTEntryPermalink$>">Posted</a> by <$MTEntryAuthor$> to <a href="<MTEntryLink archive_type="Category">"><MTEntryCategory></a>
toddcurry
Mar 6 2003, 04:02 PM
OK, just piling on here, but a follow-up question for maddy and others that is very similar to the theme here...
say I want the category to be clickable, but want the category to link to a downloadable document.
my bike team posts a ride schedule in MT that is about as simple as you can get:
Saturday, March 8, 2003 --- (category) Barrington
Sunday, ...
So, when a rider clicked on Barrington, they'd get the file stored in site.com/maps/, named barrington.pdf.
I'm sure this is really simple HTML but I'm brain dead....
Thanks,
TC
as usual, the MT straight dope squadron comes through!
Thanks!
maddy
Mar 6 2003, 04:21 PM
QUOTE
So, when a rider clicked on Barrington, they'd get the file stored in site.com/maps/, named barrington.pdf.
Is the name of the document always going to be the name of the category, and in the maps directory?
CODE
<a href="http://site.com/maps/<MTEntryCategory dirify="1">.pdf "><MTEntryCategory></a>
That should work as long as you name your pdf files according to the rules associated with the dirify function, lowercase letters, spaces converted to underscores, and special characters and punctuation removed.
Does that help?
toddcurry
Mar 6 2003, 07:51 PM
Works like a charm -- thanks, Maddy!
Zorbs
Mar 11 2003, 01:20 PM
thanks for the info on how to display the category info at the bottom of the post, but how would you display it if there were secondary categories that the post was filed under?
Zorbs
Mar 11 2003, 02:13 PM
never mind, I figured it out..thanks anyways!
psh
Mar 11 2003, 03:04 PM
How'd you do it, Zorbs? I was going to ask that very question.....no fair answering your own question without sharing!
Sproet
Mar 12 2003, 01:51 PM
CODE
<MTEntryCategories glue=" | "><a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></MTEntryCategories>
will give you something like
Apples | Bananas | Pears
(where Apples, Bananas and Pears are the categories you put your entry in)
Substitute the | in the code for anything you want, e.g. * or / or whatever
Sproet
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.