MTStreamActionRollup
出力するアクションを、特定のルールでまとめて出力するためのブロックタグです。
MT5.xでこのタグを利用するためには、をインストールしてください。
使い方
<mt:ActionStreams lastn="30"> <mt:If name="__first__"> <ul> </mt:If> <mt:StreamActionRollup by="stream"> <mt:If name="__first__"> <li><mt:StreamActionDate format_name="iso8601">l - <$mt:AuthorDisplayName escape="html"$> saved <mt:Else name="__last__"> <mt:Ignore>まとめたアクションが3つ以上の場合に 『A, B and C』という表示にする</mt:Ignore> and <mt:Else> <mt:Ignore>まとめたアクションが3つ以上の場合に 『A, B and C』という表示にする</mt:Ignore> , </mt:If> <a href="<mt:StreamActionURL escape="html">"><$mt:StreamActionTitle escape="html"$></a> <mt:If name="__last__"> </li> </mt:If> <mt:ELse> <mt:Ignore>まとめられないアクションはこのテンプレートで処理</mt:Ignore> <li><mt:StreamActionDate format_name="iso8601"> - <$mt:StreamAction$></li> </mt:StreamActionRollup> <mt:If name="__last__"> </ul> </mt:If> </mt:ActionStreams>
モディファイア
- by="date | service | stream | action"
-
どのアクションを同じものとするかを設定します。この指定に基いてアクションはまとめて出力されます。
- date: 出力するアクションを日ごとにまとめます。
- service: 出力するアクションをサービスごとにまとめます。日をまたいでも、同じサービスが連続した場合はまとめられます。
- stream: post や photo, link など、アクションのタイプ別にまとめます。日をまたいでも、同じアクションタイプが連続した場合はまとめられます。
- action: service, stream を合せて設定したのと同じです。
初期値は date, action です。
- glue="foo"
-
出力するアクションをまとめる際に、アクションとアクションの間の区切り文字を設定できます。