View Single Post
Old 10-16-2011, 10:48 AM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,529
Karma: 8075938
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Noughty View Post
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()'|- | }"
chaley is offline   Reply With Quote