MTで日付毎のtable出力
日付ごとにrowspanされたtable出力
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<MTEntries category="XXX"> <MTSetVarBlock name="key"><$MTEntryData format="%m月%d日"$>_<$MTEntryLink$></MTSetVarBlock> <MTSetVarBlock name="list" key="$key"><$MTEntryTitle$></MTSetVarBlock> </MTEntries> <MTLoop name="list"> <MTFor var="x" from="1" to="7"> <MTSetVars> date=<$MTVar name="__counter__" zero_pad="2"$>日 date_count=date_count<$MTVar name="__counter__"$> </MTSetVars> <MTIf name="__key__" like="$date"> <MTSetVar name="$date_count" value="1" op="+"> </MTIf> </MTFor> </MTLoop> <table> <MTLoop name="list" sort_by="key"> <tr> <MTVar name="__key__" regex_replace="/(.*))(.*)/","$1" setvar="date"> <MTIf name="date" ne="$date_prev"> <MTSetVar name="count" value="1" op="+"> <MTSetVarBlock name="date_rowspan">date_count<MTGetVar name="count"></MTSetVarBlock> <td <MTIf name="__first__">width="20%" </MTIf>rowspan="<$MTGetVar name="$date_rowspan"$>"><$MTGetVar name="date"$></td> <MTGetVar name="date" setvar="date_prev"> </MTIf> <td <MTIf name="__first__">width="20%"</MTIf>><$MTVar name="__key__" regex_replace="/(.*))(.*)(_.*)/","$2"$></td> <td><p class="link_01"><a href="<$MTVar name="__key__" regex_replace="/.*_/",""$>"><$MTVar name="__value__"$></a></p></td> </tr> </MTLoop> </table> |