Evangelist
Posts: 435
Karma: 572984
Join Date: Jan 2010
Location: Long Island
Device: Kobo Libra 2, Kindle 4, Nook Gl4, Nook STR, REB 1100, Ebookwise 1500,
|
Need help w/Advanced Column Icon Rule
I'm going to preface this by saying I do have a minor learning disability and without real examples of 'this results in this' and 'this results in this' I can have a hard time comprehending abstract concepts. And I have, or tried to, read through the General Program and Template language tutorials but I'm still pretty lost.
I have figured out how to get multiple icons in a column using individual rules but I can't figure out how to create a single advanced rule that will put multiple icons in a column.
This is the rule I currently have setup with Composed icons w/No Text:
Spoiler:
Code:
program:
first_non_empty
(
contains(field('tags'), "tag1", 'letter-a-icon.png', ''),
contains(field('tags'), "tag2", 'letter-c-icon.png', ''),
contains(field('tags'), "tag3", 'letter-b-icon.png', ''),
contains(field('tags'), "tag4", 'letter-b-icon.png', ''),
contains(field('tags'), "tag5", 'letter-d-icon.png', ''),
contains(field('tags'), "tag6", 'letter-x-icon.png', ''),
contains(field('tags'), "tag7", 'letter-i-icon.png', ''),
contains(field('tags'), "tag8", 'letter-c-icon.png', ''),
contains(field('tags'), "tag9", 'letter-p-icon.png', ''),
contains(field('tags'), "tag10", 'letter-p-icon.png', ''),
contains(field('tags'), "tag11", 'letter-r-icon.png', ''),
contains(field('tags'), "tag12", 'letter-s-icon.png', ''),
contains(field('tags'), "tag13", 'letter-s-icon.png', ''),
contains(field('tags'), "tag14", 'letter-x-icon.png', ''),
contains(field('tags'), "tag15", 'letter-w-icon.png', '')
)
It will only return the first icon tag it finds and ignores any others unless I have them setup as a separate rule. I suspect it's because I'm using the 'first_non_empty' qualifier but I'm really not sure which one I should be using. Any help is greatly appreciated.
|