Edgewall Software

Changes between Version 30 and Version 31 of TracDev/PortingFromGenshiToJinja


Ignore:
Timestamp:
Jan 6, 2017, 6:15:47 PM (7 years ago)
Author:
Christian Boos
Comment:

add another example where using #with rather than set was needed

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/PortingFromGenshiToJinja

    v30 v31  
    308308See [http://jinja.pocoo.org/docs/dev/templates/#assignments set] and [http://jinja.pocoo.org/docs/dev/templates/#with-statement with] docs.
    309309
    310 In addition, `with` can also be used to better control how the successive `set` on a given variable are being applied (see for example [1e25c852/cboos.git]).
     310In addition, `with` can also be used to better control how the successive `set` on a given variable are being applied (see for example [1e25c852/cboos.git] and [cc1b959e/cboos.git]).
    311311
    312312Finally be careful when using `with`: don't wrap a `block` directive within a `with`. If you want to set a global scope for the document (like in our <html> example above), it's tempting to use a single `with` statement, for clarity. But that would wrap all blocks defined in the template and strange results would ensue.