Skip to content

Instantly share code, notes, and snippets.

@markpasc
Created April 29, 2011 18:17
Show Gist options
  • Save markpasc/948750 to your computer and use it in GitHub Desktop.
Save markpasc/948750 to your computer and use it in GitHub Desktop.
mt-Order with date headers/footers if mt:orderitem supported a “unique” attribute that it doesn't
<mt:Order>
<mt:OrderHeader>
<div class="site-activity">
</mt:OrderHeader>
<mt:Entries>
<mt:DateHeader>
<mt:OrderItem unique="true">
<mt:setvarblock name="order_by">
<mt:EntryDate utc="1" format="%Y-%m-%d 00:00:00"> 0
</mt:setvarblock>
<!-- your date header code -->
</mt:OrderItem>
</mt:DateHeader>
<mt:OrderItem>
<mt:setvarblock name="order_by">
<mt:EntryDate utc="1" format="%Y-%m-%d %H:%M:%S"> 1
</mt:setvarblock>
<!-- your blog entry code -->
</mt:OrderItem>
<mt:DateFooter>
<mt:OrderItem unique="true">
<mt:setvarblock name="order_by">
<mt:EntryDate utc="1" format="%Y-%m-%d 25:00:00"> 2
</mt:setvarblock>
<!-- your date footer code -->
</mt:OrderItem>
</mt:DateFooter>
</mt:Entries>
<!-- then the same for your action streams -->
<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