Lastn Does Not Work Properly With MTArchiveList
Question
The lastn attribute, when used with the MTArchiveList tag, produces an incorrect number of archives. (Version 3.2)
Answer
As an example, if you specify the following:
<MTArchiveList archive_type="Monthly" lastn="6">
the tag only returns the last two months, instead of the last six.
The way to get around this until the bug is resolved is to multiple the lastn value you want by three:
<MTArchiveList archive_type="Monthly" lastn="18">
and that should actually give you only the last six monthly archives.
This bug can also affect the MTArchiveListFooter tag if used inside the MTArchiveList container, by causing it to not recognize when the last archive in the list is reached. If you want to use this tag and also impose a lastn value on MTArchiveList, multiple the lastn value you want by three and then subtract one:
<MTArchiveList archive_type="Monthly" lastn="17">
and that will give you the last six monthly archives as well as cause the MTArchiveListFooter tag to behave correctly.


