Help - Search - Members - Calendar
Full Version: Last post
Movable Type Community Forum > Additional Resources > Tips and Tricks
xippix
Hi all,

I want to display the latest 5 post @ my website.

and i want the result something likte this:

Title | Category | Comments

Title: gives the title of the post
Category: displays the category where the post is placed
Comments: displays the number of comments

how i get this work?

i have this now:

CODE
<MTEntries lastn="5" offset="0">
<$MTEntryTitle$>
<div class="blogbody">
    <MTEntryIfExtended>
    <span class="extended"><a href="<$MTEntryPermalink$>#more"><$MTEntryTitle$></a></span><br />
    </MTEntryIfExtended>
</MTEntries>


but that doens't work right. It displays only 1 link.
How i get this job done.?

Regards,
Bas
nammer
QUOTE (xippix @ Aug 29 2003, 10:39 AM)
Title | Category!5{ gives the title of the post
Category: displays the category where the post is placed
Comments: displays the number of comments

how i get this work?

Well, you need to add in some category and comment code smile.gif:

CODE
<MTEntries lastn="5" offset="0">
<$MTEntryTitle$> | <MTCategories>
 <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a></MTCategories> | <MTEntryIfAllowComments>
<a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
</MTEntries>



I got this information from the Category tags section of the manual and the default templates.

Does that help?

Donna
xippix
thx you helped me a lot.
but it doesn't work yet,

with rebuilding i get this error:

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


Where can i enable this option?
cedar
Go to the weblog administration and on the left select "Weblog Config" and then at the top of that page go to "Archiving" and select the Category box. Rebuild.
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.