Fine Structure

Order and Action Streams

Order, a plugin for Movable Type 4 by MarkPasc

Order is used to combine items of different types into a single ordered list.

Action Streams, a plugin for Movable Type 4 by MarkPasc

Action Streams is used to pull content such as status updates or favorites into a stream that can be displayed on your blog.

Here's the code I use for my front page to order different types of content:

<mt:Order limit="16">
<mt:Entries lastn="4" tag="(NOT @featured) AND (NOT @quickie)">
<mt:OrderItem>
<div class="item item-entry"<mt:IfNonEmpty tag="entrydataicon_name"> style="background-image:url(images/icons/<mt:entrydataicon_name>_24.png);"</mt:IfNonEmpty>>
<p class="title"><mt:IfNonEmpty tag="EntryPermalink"><a href="<mt:EntryPermalink>"></mt:IfNonEmpty><mt:EntryTitle><mt:IfNonEmpty tag="EntryPermalink"></a></mt:IfNonEmpty></p>
<p class="text"><mt:EntryExcerpt></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Read More</a> &rsaquo;</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:Entries lastn="4" tag="@quickie">
<mt:OrderItem>
<div class="item item-quickie" style="background-image:url(images/icons/cloud_24.png);">
<p class="text"><mt:EntryBody></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Add a comment</a> &rsaquo;</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:Entries lastn="4" offset="1" tag="@featured">
<mt:OrderItem>
<div class="item item-entry"<mt:IfNonEmpty tag="entrydataicon_name"> style="background-image:url(images/icons/<mt:entrydataicon_name>_24.png);"</mt:IfNonEmpty>>
<p class="title"><mt:IfNonEmpty tag="EntryPermalink"><a href="<mt:EntryPermalink>"></mt:IfNonEmpty><mt:EntryTitle><mt:IfNonEmpty tag="EntryPermalink"></a></mt:IfNonEmpty></p>
<p class="text"><mt:EntryExcerpt></p>
<p class="meta"><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryPermalink>">Read More</a> &rsaquo;</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
<mt:MultiBlog include_blogs="4">
<mt:Entries lastn="16">
<mt:OrderItem>
<div class="item item-link">
<p class="text"><strong><a href="<mt:EntryPermalink>"><mt:EntryTitle></a></strong> - <mt:EntryMore></p>
<p class="meta"><mt:IfNonEmpty tag="entrydatavia_url">[<a href="<mt:entrydatavia_url>"><mt:entrydatavia_title></a>]</mt:IfNonEmpty><a href="<mt:EntryPermalink>#comments" class="comment"><mt:EntryCommentCount></a><a href="<mt:EntryBody>"> Go there</a> &raquo;</p>
</div>
<mt:setvarblock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:Entries>
</mt:MultiBlog>
<mt:ActionStreams lastn="8">
<mt:OrderItem>
<div class="item item-action-<mt:var name="service_type">">
<p class="text"><mt:StreamAction></p>
</div>
<mt:setvarblock name="order_by"><mt:StreamActionDate utc="1" format="%Y%m%d%H%M%S"></mt:setvarblock>
</mt:OrderItem>
</mt:ActionStreams>
</mt:Order>

Comments