View Single Post
Old 05-19-2014, 07:14 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It is the template for author-sort, but modified with the sublist function. sublist shortens lists and takes 4 parameters; here it is used to sublist only the first author in author_sort:

the first parameter is implied in template mode, it is the template field which was previously defined as author_sort. That is what we are operating on.

the second and third are the start through end indices of the list (here, author_sort) which should be returned. using "0,1" returns the zeroth through first elements of the list.

The fourth parameter is the divider. In this case, "&" divides each author in author_sort

The documentation for templates is at http:/manual.calibre-ebook.com/template_lang.html
eschwartz is offline   Reply With Quote