View Single Post
Old 12-31-2015, 05:02 AM   #23
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,461
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by eschwartz View Post
Can you show multiple icons? (My inexperience shows. ) If so, you will want to process each list_item() in turn and add it.
If a rule (a template) returns multiple values (a comma-separated list) then each item is assumed to be a PNG file name. They are displayed in the order they occur.
Quote:
I don't believe there is a builtin way to iterate over anything in GPM, though a custom function could do it.
No, there isn't any iteration in the template language.

As you say, you can iterate in a custom template function (CF). My guess is that in this case a CF would have between 1 and 2 orders of magnitude better performance than a GPM template because the CF would evaluate only what it needs, while a GPM template evaluates all arguments then applies the logic.
chaley is offline   Reply With Quote