|
|
#1 | |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,364
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Template: avoid multiple images?
Quote:
Code:
strcat
(
contains(f, "foo", 'foobar.png:', ''),
contains(f, "bar", 'foobar.png:', ''),
)
|
|
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Moderator Notice In general, you should make a new thread for questions about existing templates. Or use the older thread, for that matter.
Moved to separate thread Last edited by chaley; 01-15-2021 at 05:44 AM. |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program:
f = field('#fanficcat');
strcat
(
contains(f, "Dragon Age: Origins", 'dragonageorigins.png', ''),
contains(f, "Half-Life", 'halflife.png', ''),
contains(f, "Mass Effect", 'masseffect.png', ''),
contains(f, "The Elder Scrolls", 'theelderscrolls.png', ''),
contains(f, "Pokémon", 'pokemon.png', ''),
contains(f, "Portal", 'portal.png', ''),
first_non_empty(
contains(f, "foo", 'foobar.png:', ''),
contains(f, "bar", 'foobar.png:', ''),
)
)
Code:
contains(f, "^(foo|bar)$", 'foobar.png:', '') |
|
|
|
|
|
|
#4 |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,364
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
That'll work.
In my case, I was adding generic media-type icons (e.g. a book or a game controller or a roll of film) to categories if I didn't have a more specific icon. It was appearing multiple times for crossovers though. In hindsight, I also think I could've made a separate rule with first_non_empty. Thank you Last edited by ownedbycats; 01-15-2021 at 06:36 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Possible to Do Multiple Replacements in a Save Template? | rebeltaz | Library Management | 2 | 08-27-2020 01:03 AM |
| How to avoid adding borders to images and headings when importing to library | epilandrus | Conversion | 4 | 03-06-2015 11:31 AM |
| help with saving template having multiple authors? | miquele | Library Management | 2 | 04-16-2013 05:49 PM |
| How to avoid whits space when displaying images? | huebi | ePub | 3 | 05-16-2012 02:53 PM |
| Avoid the "jagged" images in multiple e-readers | nathanp | ePub | 8 | 03-10-2012 05:08 PM |