![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,977
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Help with another template
My old #kobopath column (used for my device save template) was an enumerated column...which had the same values my top-level tags. So I changed it to this:
Code:
{tags:'list_re($, ',', '^(.*?)($|\..*$)', '\1')'} ![]() However, my old enumerated column also had a separate entry for PDFs. How would I change this template so that it shows "PDFs" instead of the top-level tag if that's the only available format? ![]() Last edited by ownedbycats; 02-07-2021 at 08:20 PM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
My first thought is something like:
Code:
program: if approximate_formats() == 'PDF' then 'PDF' else list_re(field('tags'), ',', '^(.*?)($|\..*$)', '\1') fi |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,977
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
yes, that works! I was trying to figure out how to get approximate_formats right. Thank you.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need Template help | Grebenshchikov | Library Management | 4 | 01-01-2021 08:45 PM |
"Normal" template inside GPM template | ownedbycats | Library Management | 20 | 12-02-2020 09:40 PM |
Help with a template | dunhill | Library Management | 10 | 06-04-2020 06:34 AM |
Using built-in template functions in a custom template function | ilovejedd | Library Management | 4 | 01-28-2018 12:20 PM |
Help with template | KALKITO | Library Management | 1 | 07-02-2012 02:54 PM |