scriptygoddess

28 Dec, 2003

Calendar modification

Posted by: Jennifer In: MT Tips n Tricks

This is very basic – but I wanted to save the code somewhere. The default "Calendar" template has the dates linked to the last entry on that calendar day (mtpermalink) – but it would make more sense to have those links point to the DAILY ARCHIVE page (this assumes you have "daily" checked off as one of your archiving types in your weblog settings/archiving)

Here's the whole thing, just so you have it for reference. I only changed the one line in bold:

<div align="center" class="calendar">
<table border="0" cellspacing="4" cellpadding="0" summary="Monthly calendar with links to each day's posts">
<caption class="calendarhead"><$MTDate format="%B %Y"$></caption>
<tr>
<th abbr="Sunday" align="center"><span class="calendar">Sun</span></th>
<th abbr="Monday" align="center"><span class="calendar">Mon</span></th>
<th abbr="Tuesday" align="center"><span class="calendar">Tue</span></th>
<th abbr="Wednesday" align="center"><span class="calendar">Wed</span></th>
<th abbr="Thursday" align="center"><span class="calendar">Thu</span></th>
<th abbr="Friday" align="center"><span class="calendar">Fri</span></th>
<th abbr="Saturday" align="center"><span class="calendar">Sat</span></th>
</tr>
<MTCalendar>
<MTCalendarWeekHeader>
<tr>
</MTCalendarWeekHeader>
<td align="center"><span class="calendar">
<MTCalendarIfEntries>
<MTEntries lastn="1">
<a href="<$MTEntryLink archive_type="Daily"$>">
<$MTCalendarDay$>
</a>
</MTEntries>
</MTCalendarIfEntries>
<MTCalendarIfNoEntries>
<$MTCalendarDay$>
</MTCalendarIfNoEntries>
<MTCalendarIfBlank>
 
</MTCalendarIfBlank>
</span>
</td>
<MTCalendarWeekFooter>
</tr>
</MTCalendarWeekFooter>
</MTCalendar>
</table>
</div>

Related posts:

  1. Adding alternate row styles to a table with JQuery JQuery's simplicity is so wonderful and powerful. Here's a perfect...

Related posts brought to you by Yet Another Related Posts Plugin.

No Responses to "Calendar modification"

Comments are closed.

Featured Sponsors


  • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

About


Advertisements