Jump to content

Recommended Posts

Posted

Hi - I'd like to get a list of my recent entries on my Date-Based Archive Template. I tried copying the code from the main index, but nothing shows up in the actual list.

 

This was the code:

 

><div class = "recententries">
<h2>Recent Entries</h2>

<ul>
<MTEntries lastn="8">
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br>
</MTEntries>
</ul>
</div>

I assume it has something to do with the tags, but I'm not sure what I'd have to change. Any tips? Thanks!!

Posted
<div class = "recententries">

<h2>Recent Entries</h2>

 

<ul>

<MTEntries lastn="8">

<a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br>

</MTEntries>

</ul>

</div>

The one thing that I see wrong is that you have the <ul></ul> tags to define a list, but don't have the <li></li> tags to define the list elements. Either take out the <ul></ul> tags or add the <li></li> tags like this:

 

><div class = "recententries">
<h2>Recent Entries</h2>

<ul>
<MTEntries lastn="8">
<li><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a></li>
</MTEntries>
</ul>
</div>

 

See if either of those work. :group:

Posted

I tested the code on a test weblog I have, and MT does output entries, but it will only display the last 8 entries in the context of the Date-Based Archive the code appears in. For example, if you're using monthly archives, the archive page for June, 2005 would only show the last 8 entries made during the month of June.

 

You might want to consider using the solution I suggested for your category and recent comment sidebar listings in your other topic. By putting your code in an Index template, it would not be evaluated in the date context of a Date-Based archive template and thus would always show your most recent entries.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...