View Single Post
Old 01-19-2011, 06:47 AM   #39
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,482
Karma: 8025704
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by beckywc View Post
Do I place this in the documentation box of the template function? Sorry I'm really a new at this.
No. This is a template, and it goes in the template box when you create the new custom column.

In general, templates begin with a { character or, rarely, the word 'program:'. Python code, the stuff that goes into the template functions dialog, begin with 'def evaluate'. It will be rare that someone provides a python template function, because so few people can understand and modify them. Templates are more easily modified by users, so you will see them more often.

Pointer: you can edit a composite (column made from columns) custom column's template by clicking in the column and hitting F2. A dialog box will open in which you can change the template. This is far more convenient than editing the column definition.

You might want to read calibre's template language manual http://calibre-ebook.com/user_manual/template_lang.html. That might give you some info about what it is the template is doing.
chaley is offline   Reply With Quote