14-1 複数ブログの情報を1つのカレンダーにまとめて表示する
268ページ
「メインページ」インデックステンプレート
<mt:SetVar name="undef(calendar_data)" />
<mt:Blogs include_blogs="1,2,3">
<mt:BlogID setvar="blog_number" />
<mt:SetVar name="counter" value="1" />
<mt:MultiCalendar blog_id="$blog_number">
<mt:CalendarIfEntries>
<mt:Entries>
<mt:SetVarBlock name="calendar_data" key="$counter" append="1">
<li><a href="<mt:EntryPermalink />"><mt:EntryTitle /></a></li>
</mt:SetVarBlock>
</mt:Entries>
</mt:CalendarIfEntries>
<mt:SetVar name="counter" op="++" />
</mt:MultiCalendar>
</mt:Blogs>
<div class="asset-header">
<h2 class="asset-name entry-title"><mt:Date format="%B %Y" /></h2>
<div class="asset-content entry-content">
<table summary="リンク付きのカレンダー">
<thead>
<tr height="15">
<th abbr="Sunday" class="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" class="saturday">Sat</th>
</tr>
</thead>
<tbody>
<mt:SetVar name="counter" value="1" />
<mt:Calendar>
<mt:CalendarWeekHeader>
<tr>
</mt:CalendarWeekHeader>
<td><mt:CalendarIfEntries><span><mt:CalendarDay /></span></mt:CalendarIfEntries><mt:CalendarIfNoEntries><span><mt:CalendarDay /></span></mt:CalendarIfNoEntries><ul><mt:GetVar name="calendar_data" key="$counter" /></ul><mt:CalendarIfBlank> </mt:CalendarIfBlank></td>
<mt:CalendarWeekFooter>
</tr>
</mt:CalendarWeekFooter>
<mt:SetVar name="counter" op="++" />
</mt:Calendar>
</tbody>
</table>
</div>
</div>
270ページ
table {
width: 500px;
margin-left: 5px;
margin-bottom: 30px;
color: #000;
border: 1px solid #666;
border-collapse: separate;
border-spacing: 1px;
font-size: 120%;
}
table th {
color: #000;
padding: 5px;
border-right: 1px solid #666;
border-bottom: 1px solid #666;
text-align: center;
}
table td {
padding: 2px 5px;
border-right: 1px solid #666;
border-bottom: 1px solid #666;
text-align: center;
}
table td ul {
margin-left: 0;
padding: 0;
list-style: none;
}
271ページ
<ul><mt:GetVar name="calendar_data" key="$counter" regex_replace="/Array/","" /></ul>