Tags and Filters

Andreas Stenius edited this page Jan 10, 2014 · 3 revisions
Clone this wiki locally

Tags

ErlyDTL 0.7 and later implements the following Django tags:

  • autoescape

  • block

  • comment

  • cycle (but only in loop context)

  • extends

  • filter (added in 0.7)

  • firstof

  • for - loops over a list or tuple - also resolves nested, dot-separated variable attributes

  • if

  • ifequal

  • ifnotequal

  • include

  • now

  • spaceless (added in 0.7)

  • ssi (added in 0.7)

  • templatetag (added in 0.7)

  • trans

  • widthratio (added in 0.7)

  • with (added in 0.7)

    Note: since dtl 1.3, the syntax has been updated to {% with var=expr ... %}.

In addition, you can use the tag tag to include a template with a list of arguments. ErlyDTL ships with one such custom tag called flashvideo.

Finally, the non-standard call tag inserts the rendered output of an already compiled template beam-file.

Filters

ErlyDTL 0.7 and later implement 100% of Django filters. See the Django filter documentation.