Changes between Version 48 and Version 49 of TracDev/PortingFromGenshiToJinja
- Timestamp:
- Apr 9, 2020, 12:09:16 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/PortingFromGenshiToJinja
v48 v49 659 659 - Jinja2 [[xml(# include "the_file.html" ignore missing)]] 660 660 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 }}} 661 See [http://jinja.pocoo.org/docs/dev/templates/#include include] doc. Note that the `ignore missing` part is needed if the template may not exist. 669 662 670 663 It is also possible to pass "parameters" to included templates.