![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Apr 2024
Device: Kindle Paperwhite
|
Template language functions not being evaluated
Hey all,
I have the problem that no functions used in a template are evaluated (or parsed). Meaning, the function call itself will be part of the output. I first tried to get the pubdate year, but now noticed that nothing seems to work (see the capitalize call). Template: Code:
{author_sort}/ {series:||{series_index:| #|} - } {title} ({pubdate})/ {authors} - {series:||{series_index:| #|} - } {title} (format_date_field('pubdate', 'yyyy')) format_date(field('pubdate'), 'yyyy') capitalize('asdf') Output: Code:
Sands, Philippe/ East West Street: On the Origins of "Genocide" and "Crimes Against Humanity" (Apr 2016)/ Philippe Sands - East West Street: On the Origins of "Genocide" and "Crimes Against Humanity" (format_date_field('pubdate', 'yyyy')) format_date(field('pubdate'), 'yyyy') capitalize('asdf') |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I suspect that you want this, using Single Function Mode: Code:
{author_sort}/ {series:||{series_index:| #|} - } {title} ({pubdate:format_date('yyyy')})/ {authors} - {series:||{series_index:| #|} - } {title} |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Apr 2024
Device: Kindle Paperwhite
|
Thank you very much for the help. Seems I must have missed the different modes when using the functions.
One problem left: using Code:
({pubdate:format_date('yyyy')}) Code:
('2016') Thanks in advance. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Apr 2024
Device: Kindle Paperwhite
|
Well now I feel dumb. Kinda confused how that parameter doesn't have to be a string, but I'm happy with the result.
Thank you. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
template language |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template functions: where to find them? | Terisa de morgan | Library Management | 1 | 09-03-2023 07:05 PM |
python templates (was possible template functions) | chaley | Development | 66 | 10-24-2022 12:34 PM |
A little help with template functions in a composite column, please! | mopkin | Library Management | 2 | 11-05-2019 11:07 PM |
Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 12:20 PM |
template: if one of the tag is something... maybe contains or in_list functions | fxp33 | Calibre | 4 | 07-19-2014 05:18 AM |