The Calendar that comes with Movable Type 4.01 links to the last Entry made on a day, instead of to a Daily Archive page for that day - probably because MT 4 doesn't ship with Daily Archives turned on. And, it doesn't highlight the current day.
So, I added MTCalendarIfToday in the Calendar code, created a "today" class in my custom stylesheet template, added a Daily Archive template and set its filename to /yyyy/mm/dd/index.php, and changed the day links in the Calendar code. Works great! The Calendar code changes are:
<div class="widget-calendar widget">
<h3 class="widget-header"><$MTDate format="%B %Y"$></h3>
<div class="widget-content">
<table summary="Monthly calendar with links to each day's posts">
<tr>
<th abbr="Sunday">Sun</th>
<th abbr="Monday">Mon</th>
<th abbr="Tuesday">Tue</th>
<th abbr="Wednesday">Wed</th>
<th abbr="Thursday">Thu</th>
<th abbr="Friday">Fri</th>
<th abbr="Saturday">Sat</th>
</tr>
<MTCalendar>
<MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
<td <MTCalendarIfToday>class="today"</MTCalendarIfToday>>
<MTCalendarIfEntries>
<MTEntries lastn="1">
<a href="<$MTEntryLink archive_type="Daily"$>"><$MTCalendarDay$></a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<$MTCalendarDay$>
</MTCalendarIfNoEntries>
<MTCalendarIfBlank> </MTCalendarIfBlank></td>
<MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
</MTCalendar>
</table>
</div>
</div>










Leave a comment