Quote:
Originally Posted by Noughty
I need to write:
{'otherts()'} in custom column made from other tags (behaves like tags)?
I get error:
EXCEPTION: Value: unknown field 'otherts()'
|
Ahh, my mistake, which I fixed in my example above. You should all {:'otherts()'}. I left out the colon (the second character).
For completeness, the :' tells the formatter that what follows is in template program mode, which allows use of functions as arguments and zero-parameter functions. The program goes up to the '}. Writing "{:'foobar()'}" is exactly the same as writing "program:foobar()".
You might then ask "why use program:"? That construct allows multiple lines and multiple statements, and is (I think) easier to read. On the other hand, template program mode expressions can be combined together in a single template, such as "{title} {:'foobar()'|- | }"