Skip to content

Instantly share code, notes, and snippets.

@markpasc
Created May 9, 2011 21:06
Show Gist options
  • Save markpasc/963411 to your computer and use it in GitHub Desktop.
Save markpasc/963411 to your computer and use it in GitHub Desktop.
mt-Order with date headers/footers if mt:orderitem supported OrderDateHeader and Footer tags that it doesn't
<mt:Order>
<mt:OrderHeader>
<div class="site-activity">
</mt:OrderHeader>
<mt:OrderDateHeader>
<h2><mt:Date format="%a, %d %b %Y"></h2>
<div id="datebox">
</mt:OrderDateHeader>
<mt:OrderDateFooter>
</div>
</mt:OrderDateFooter>
<mt:Entries>
<mt:OrderItem>
<!-- note the dates are NOT in utc -->
<mt:setvarblock name="order_by">
<mt:EntryDate utc="0" format="%Y-%m-%d %H:%M:%S">
</mt:setvarblock>
<!-- your blog entry code -->
</mt:OrderItem>
</mt:Entries>
<mt:StreamActions> <!-- with yr selection options -->
<mt:OrderItem>
<!-- this timestamp should convert to the current blog's
local time, but you should check that it does -->
<mt:setvarblock name="order_by">
<mt:StreamActionDate utc="0" format="%Y-%m-%d %H:%M:%S">
</mt:setvarblock>
<!-- your stream action code -->
</mt:OrderItem>
</mt:StreamActions>
<mt:OrderFooter>
</div>
</mt:OrderFooter>
</mt:Order>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment