標簽應用

As you can see, I changed the layout of the weblog including color of background, the archive file naming standard, the location of article context and more. The main changes and the ways to change are:

  • Individual archive name : put the following line to weblog config->archiving->Archive File Template (Individual):
    <$MTArchiveDate format="%Y/%m/%d"$>/<$MTEntryTitle dirify="1"$>.html
  • Directory by category : add following line to weblog config->archiving->Archive File Template (category) as above:
    categories/<$MTArchiveCategory dirify="1"$>/index.html
  • Big calendar for monthly archive : create a new template for monthly archive, following lines are the key code for the calendar:
    <div class="largecalendar">
    <table cellpadding="0" cellspacing="0" summary="Monthly calendar with links to each day’s posts">
    <caption><span class="prevmonth"><MTArchivePrevious><a href="<$MTArchiveLink$>" title="<$MTArchiveTitle$>">&lt;&lt;</a></MTArchivePrevious></span>
    <$MTEntryDate format="%B %Y"$>
    <span class="nextmonth"><MTArchiveNext><a href="<$MTArchiveLink$>" title="<$MTArchiveTitle$>">&gt;&gt;</a></MTArchiveNext></span>
    </caption>
    <thead>
    <tr>
    <th class="sun">Sunday</th>
    <th class="mon">Monday</th>
    <th class="tue">Tuesday</th>
    <th class="wed">Wednesday</th>
    <th class="thu">Thursday</th>
    <th class="fri">Friday</th>
    <th class="sat">Saturday</th>
    </tr>
    </thead>
    <tbody>
    <MTCalendar month="this">
    <MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
    <td class="d<$MTCalendarCellNumber$>">
    <MTCalendarIfEntries>
    <a class="daytitle" href="<MTEntries lastn="1"><$MTEntryLink$></MTEntries>"><$MTCalendarDay$></a>
    <ul>
    <MTEntries lastn="1">
    <li class="first"><a href="<$MTEntryLink$>"><$MTEntryTitle$></a></li>
    </MTEntries>
    <MTEntries lastn="999" offset="1">
    <li><a href="<$MTEntryLink$>"><$MTEntryTitle$></a></li>
    </MTEntries>
    </ul>
    </MTCalendarIfEntries>
    <MTCalendarIfNoEntries>
    <div class="daytitle"><$MTCalendarDay$></div>
    </MTCalendarIfNoEntries>
    <MTCalendarIfBlank>&nbsp;</MTCalendarIfBlank>
    </td>
    <MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
    </MTCalendar>
    </tbody>
    </table>
    </div> <!--calendar-->

Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *