evanmiller/erlydtl — pull request #79 by kaos (2013-06-20 14:16:49+00:00)
Title: Support for dynamically extending the template language at template compile time

With support for dynamic extensibility, zotonic will be able to implement customizations on top of this ErlyDTL version instead of keeping its own fork (as discussed at EUC ;).

No doubt there are still more to be done, but a simple extension is already possible.
From a commit message:

The test case for the extension module adds the functionality to write

``{{ varA or varB }}``

Which is equivalent to

``{% if varA %}{{ varA }}{% else %}{{ varB }}{% endif %}``

With a few (hrmm... ok, maybe not so few) lines of code ;)