Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50080

Template: Matching an entire list

$
0
0
I want one of the clauses of a gpm template to return true iif the only available format is epub. I tested with this:

Code:

program:
        f = $formats;

        if
                list_contains(f, ',', '^epub$', '1', '')
        then 'foobar'
        fi

However, it returns 'foobar' for every book that has epub, even if there's other formats.

What should I do?

EDIT: Also, there are other times I might want to match the entire list contents. I am not sure how to do that though.

Viewing all articles
Browse latest Browse all 50080

Latest Images

Trending Articles



Latest Images