Edgewall Software

Changes between Version 48 and Version 49 of TracDev/PortingFromGenshiToJinja


Ignore:
Timestamp:
Apr 9, 2020, 12:09:16 AM (4 months ago)
Author:
Ryan J Ollos
Comment:

Document #13242.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PortingFromGenshiToJinja

    v48 v49  
    659659 - Jinja2 [[xml(# include "the_file.html" ignore missing)]]
    660660
    661 See [http://jinja.pocoo.org/docs/dev/templates/#include include] doc. Note that the `ignore missing` part is mandatory no templates are given to the `include` directive. This includes the following situation:
    662 {{{#!html+jinja
    663 # include "sometemplate.html" if false
    664 }}}
    665 This alone would raise an error. The correct thing to write is:
    666 {{{#!html+jinja
    667 # include "sometemplate.html" if false ignore missing
    668 }}}
     661See [http://jinja.pocoo.org/docs/dev/templates/#include include] doc. Note that the `ignore missing` part is needed if the template may not exist.
    669662
    670663It is also possible to pass "parameters" to included templates.