Help - Search - Members - Calendar
Full Version: MTEntryDate incorrect inside MTEntryPrevious
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
dvd
I have the following code in a dynamic individual archive:

CODE
<MTEntryPrevious><a href="/archives/<$MTEntryDate format="%Y/%m/%d/"$><$MTEntryID$>.html">Prev</a></MTEntryPrevious>

<MTEntryNext><a href="/archives/<$MTEntryDate format="%Y/%m/%d/"$><$MTEntryID$>.html">Next</a></MTEntryNext>


which, as you can see, is supposed to generate links to the previous and next entries. Unfortunately, when I view one of the archives which this template generates, MT appears put the current entry's date in both places where MTEntryDate is used, instead of the date of the previous or next entry. Is that the right behaviour?

I can't use MTEntryLink or MTEntryPermalink as this archive template is not the "preferred" one as defined in the Weblog Config, so I have to construct the (virtual) path in the above way.
shelley
When you say it's not the "preferred one", do you mean as defined on the Preferences screen, or on the Archive Files screen, where you have multiple archives of that type and this one does not have the radio button beside it selected?
dvd
QUOTE (shelley @ Sep 12 2004, 11:42 AM)
When you say it's not the "preferred one", do you mean as defined on the Preferences screen, or on the Archive Files screen, where you have multiple archives of that type and this one does not have the radio button beside it selected?

I mean as defined on the Archive Files screen: I have two different Individual Archive templates, and this one does not have the radio button selected.
DisneyJoe
Does this behavior only exist when using dynamic page generation? I believe I am having a similar issue with the Previous and Next showing the same entry.

It goes away if I am using static pages, but when I use dynamic, it comes back, but not all of the time.
dvd
QUOTE
Does this behavior only exist when using dynamic page generation?


Yes, it only seems to occur with dynamic pages. If I switch the template to static, the tags produce the correct dates.
dvd
This definitely seems to be a bug. I created a stripped-down monthly archive which consisted solely of:

CODE
<ul>
<MTEntries>
<li><$MTEntryTitle>, <$MTEntryDate$>
<ul>
<MTEntryPrevious>
<li><$MTEntryTitle>, <$MTEntryDate$></li>
</MTEntryPrevious>
<MTEntryNext>
<li><$MTEntryTitle>, <$MTEntryDate$></li>
</MTEntryNext>
</ul></li>
</MTEntries>
</ul>


and set it to dynamic building. For the current month, it resulted in this output:

QUOTE
  • Gruff, September 14, 2004 06:25 PM
    • It's my birthday and I'll blog if I want to, September 14, 2004 06:25 PM


  • It's my birthday and I'll blog if I want to, September  9, 2004 06:00 AM
    • Silly things Windows XP won't let a restricted user do, September  9, 2004 06:00 AM
    • Gruff, September  9, 2004 06:00 AM


  • Silly things Windows XP won't let a restricted user do, September  5, 2004 06:24 PM
    • In lieu, September  5, 2004 06:24 PM
    • It's my birthday and I'll blog if I want to, September  5, 2004 06:24 PM


  • In lieu, September  4, 2004 06:08 PM
    • It's their attention to detail that sold me, September  4, 2004 06:08 PM
    • Silly things Windows XP won't let a restricted user do, September  4, 2004 06:08 PM


Notice how the dates next to each entry inside MTEntryNext and MTEntryPrevious match the date of the current entry.
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-2008 Invision Power Services, Inc.