Quote:
Originally Posted by svda
Here's my feedback :
...
@eschwarz, your solution is missing the {title} at the end of the string I want to write.
Otherwise, perfect! Haven't found out yet where to put the last {title}
I'm trying to learn from the examples I get, so thanks to both of you.
|
Whoops, sorry. Here, I've added it:
PHP Code:
program:
strcat(
template("{author_sort}/{title}/{author_sort} - {series:|[|}"),
ifempty(
finish_formatting(
field("series_index"),
'0>3',
' ',
'] '
),
finish_formatting(
format_date(
field('pubdate'),
'yyyy'),
'',
' (',
') '
)
),
field('title')
)
At the end, I added one more entry to strcat, the final field('title').
(I also fixed an error where the date didn't have a space appended to separate it from the title.)
If you are trying to learn how this all works, a good resource is the calibre manual entry on templates, which also lists the different functions available. See here:
http://manual.calibre-ebook.com/template_lang.html and ask questions if you need help understanding how it all works!