Quote:
Originally Posted by PeterT
Not being a templats language expert, I'd think that using list_intersection might be an idea; something along the lines of list_intersection(tags, <list of comics, fanfiction, etc>
If the list_intersection is null and tags = subjects
|
List_intersection was the first thing I thought of, but given that the OP is using the "=." form of the search, it won't work well because it checks the entire value.
Using in_list might be better than a series of and conditions. It depends on how common the tests are, because search does shortcutting. By in_list I mean something like this:
Code:
program:
if ! ("\.Comics$|\.Documentations & Manuals$|\.Fanfiction$|\.Fiction$|\.Magazines & Publications$|\.Magazines & Publications$" inlist $tags) && "\.Subjects$" inlist $tags then
'whatever'
fi
However, what you have isn't bad because of shortcutting, is easy to read, and easy to change, so I probably wouldn't mess with it.