Created
May 27, 2011 04:46
-
-
Save markpasc/994654 to your computer and use it in GitHub Desktop.
patch to add an mt:OrderDate tag that honors date contexts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/Order/config.yaml b/plugins/Order/config.yaml | |
index 46181f2..f4da46d 100644 | |
--- a/plugins/Order/config.yaml | |
+++ b/plugins/Order/config.yaml | |
@@ -14,3 +14,5 @@ tags: | |
OrderFooter: $Order::Order::Plugin::tag_order_footer | |
OrderDateHeader: $Order::Order::Plugin::tag_order_date_header | |
OrderDateFooter: $Order::Order::Plugin::tag_order_date_footer | |
+ function: | |
+ OrderDate: $Core::MT::Template::Context::_hdlr_date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:Order> | |
<mt:OrderDateHeader> | |
<h2><mt:OrderDate format="%a, %d %b %Y"></h2> | |
<div id="datebox"> | |
</mt:OrderDateHeader> | |
<mt:OrderDateFooter> | |
</div> | |
</mt:OrderDateFooter> | |
<mt:Entries> | |
<mt:OrderItem> | |
<mt:setvarblock name="order_by"> | |
<mt:EntryDate utc="0" format="%Y%m%d%H%M%S"> | |
</mt:setvarblock> | |
<mt:EntryTitle> | |
</mt:OrderItem> | |
</mt:Entries> | |
<mt:ActionStreams> | |
<mt:OrderItem> | |
<mt:setvarblock name="order_by"> | |
<mt:StreamActionDate utc="0" format="%Y%m%d%H%M%S"> | |
</mt:setvarblock> | |
<mt:StreamAction> | |
</mt:OrderItem> | |
</mt:ActionStreams> | |
</mt:Order> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment