Login

Tag "set"

Snippet List

blocksetter

Sometimes you need to set a little bit more complex variable in the template (e.g. Title), that is being used more than once. this simple tag defines "blockset" tag. {% blockset variable-name %}{%endblockset} everything inside body (between blockset/endblockset) is being assigned to the variable "variable-name". I have found this quite useful with translations, or setting the title, where you out several variables into one sentence. Drop me an email if you will find this useful.

  • templatetag
  • block
  • set
Read More

1 snippet posted so far.