www.dolben.org


MTArchiveYears

MTArchiveYears is a Movable Type PHP plugin that produces yearly tables of monthly archive links—analogous to MTCalendar. Note that monthly archives must exist for the links to work.

Download

The "zip" file (2005 Jan 14) can be downloaded. Put the unzipped files in "<$MTCGIPath>php/plugins/".

Tags

MTArchiveYears
A tag which contains a list of the consecutive months of the blog entries, including those for which there are no entries, starting at January of the first year and ending at December of the last year. The "years" option may be used to limit the years displayed to some number of the most recent.

MTArchiveIfYearHeader
A container tag, its contents will be displayed at the beginning of each year.

MTArchiveIfYearFooter
A container tag, its contents will be displayed at the end of each year.

MTArchiveIfLineBegin
A container tag, its contents will be displayed at the beginning of each line.

MTArchiveIfLineEnd
A container tag, its contents will be displayed at the end of each year.

MTArchiveIfEntries
A container tag, its contents will be displayed if there are entries in the current month.

MTArchiveDate
The MTArchiveList tag used to display the date of the current month.

MTArchiveLink
The MTArchiveList tag which is the URL of the current archive month.

Example

usage

<MTArchiveYears>
<MTArchiveIfYearHeader>
    <table>
      <caption><$MTArchiveDate format="%Y"$></caption>
</MTArchiveIfYearHeader>
<MTArchiveIfLineBegin>
      <tr>
</MTArchiveIfLineBegin>
        <td>
<MTArchiveIfEntries>
          <a href="<$MTArchiveLink$>">
</MTArchiveIfEntries>
            <$MTArchiveDate format="%b"$>
<MTArchiveIfEntries>
          </a>
</MTArchiveIfEntries>
        </td>
<MTArchiveIfLineEnd>
      </tr>
</MTArchiveIfLineEnd>
<MTArchiveIfYearFooter>
    </table>
</MTArchiveIfYearFooter>
</MTArchiveYears>

    

output

2003
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
2004
Jan Feb Mar Apr
May Jun Jul Aug
Sep Oct Nov Dec
Hank Dolben

PHP Apache

last modified