Ordinal Suffix in Smarty Templates

  1. The email templates use Smarty syntax. Here's the reference:

    http://www.smarty.net/docs/en/smarty.for.designers.tpl

    You're looking for the data_format function:

    http://www.smarty.net/docs/en/language.modifier.date.format.tpl

    What is required to show the ordinal suffix is unfortunately not documented there. You can also use additional format syntax like PHP's date() function http://www.php.net/manual/en/function.date.php with the Smarty date_format function. So, if you want to use the ordinal suffix, you can do this:

    ... on the {$invoice.billingDatetime|date_format:"jS"} of the month...
    
  2. Jess Pendley closed this discussion on 21 Nov, 2013 07:36 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions