Help - Search - Members - Calendar
Full Version: Showing Last N Entires Of A Special Category.
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
neplusultra
I will be thankful if somebody tells me how to do that , i need the code ( i mean if a special tag exists) to show last n entries of a special subject .

i used <MTEntries category="category_name"> tag , but there's nothing in my page ?!?!?!
wildernessdave
QUOTE (neplusultra @ Sep 21 2008, 03:09 PM) *
I will be thankful if somebody tells me how to do that , i need the code ( i mean if a special tag exists) to show last n entries of a special subject .

i used <MTEntries category="category_name"> tag , but there's nothing in my page ?!?!?!



<MTEntries category="category_name",lastn="5">
<h3 class="entry-header"> <$MTEntryDate format="%x"$>: <a href="<$MTEntryPermalink valid_html="1"$>"><b><$MTEntryTitle$></b></a></h3><BR><BR>


</MTEntries>

If you change then category name to the one you want you should get the Titles for the 5 most recent entries with links to those entries.

I hope this helps, I am a bit of a novice ;->
neplusultra
QUOTE (wildernessdave @ Sep 21 2008, 03:22 PM) *
<MTEntries category="category_name",lastn="5">
<h3 class="entry-header"> <$MTEntryDate format="%x"$>: <a href="<$MTEntryPermalink valid_html="1"$>"><b><$MTEntryTitle$></b></a></h3><BR><BR>


</MTEntries>

If you change then category name to the one you want you should get the Titles for the 5 most recent entries with links to those entries.

I hope this helps, I am a bit of a novice ;->


Thanks a milion wildernessdave but this code does not work on my page neither ! you now i try MTEntries tag without the category attribute and it works , it shows last n entries in the whole blog , but when i add the category attribute , it does not work , and it shows nothing in the page , i think i have a problem with the category attribute .

i don't know what to do ! sad.gif
neplusultra
biggrin.gif finally i could find the solution :

if you use the code below , you can show last n entries belong to a specific category.

of course you have to use your own category name and number n

CODE
<category label="category name">
<MTEntries lastn="n">
<p><a href="<MTEntryPermalink>"><MTEntryTitle></a></p>
</MTEntries>
</category>



have fun wink.gif
jeremyw
QUOTE (neplusultra @ Sep 22 2008, 12:21 PM) *
if you use the code below , you can show last n entries belong to a specific category.

CODE
<category label="category name">
<MTEntries lastn="n">
<p><a href="<MTEntryPermalink>"><MTEntryTitle></a></p>
</MTEntries>
</category>


I'm not clear how this works as the category tag doesn't seem to be listed in the documentation, but it did do something when I tested it (MT4.21). It just doesn't seem to work reliably. Where is this tag coming from?
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.