MT-SomeDays 3.6.0 »
I've just finished making the final adjustments to the code for MT-SomeDays version 3.6.0.
This version adds exactly one new feature: The limit attribute. The limit attribute works almost exactly like the lastn attribute on the <MTEntries> container. That is to say, it determines the number of entries that are returned by the container.
Here are two examples:
<MTSomeDays limit="X">
<MTSomeDays limit="X" reverse="1">
I say that the limit attribute works almost the same, because its behavior depends on the value of another attribute: The reverse attribute. If you do not include the reverse attribute on your <MTSomeDays> tag, then the entries limited will be from the beginning of the container. That is to say, the first entries.
However, if you include the reverse attribute, then your days are listed in reverse order - so the entries limited are from the end of the loop, or the last entries for that period of time.





















Comments (2)
I don't know what's happening with it.
And here's the code I have...
<MTSomeDays limit="3" reverse="1">
<MTEntries sort_order="descend">
<h5><MTEntryDate format="%B %e"></h5>
<h4><a href="<MTEntryLink>"><MTEntryTitle></a></h4>
<p><MTEntryExcerpt></p>
</MTEntries>
</MTSomeDays>
Posted by Aaron on February 27, 2004 4:31 PM
I'd suspect the problem might be with your MTSomeDays container tag. You've got a "limit" and a "reverse", which means it will include the last three entries from the period you've selected. The problem is that you aren't using anything to select dates for the container - so you're only going to get the current context date (the current build date unless in a daily archive).
What are you after? For instance, do you want the last three entries from the last week? Month? You may want to replace your MTSomeDays tag with something like this:
<MTSomeDays limit="3" reverse="1" select="week">
Which will select the current calendar week (Sun-Sat). You could also try something like this:
<MTSomeDays limit="3" reverse="1" select="month">
Which will select the current calendar month. You can do other things to select last calendar week or month or whatever, but I think that's the best place to start.
Posted by Chad Everett on February 27, 2004 4:55 PM