Using the AND and OR Operators

The simple syntax used in the previous example can be enhanced by asking for more than one term. If you want to see a list of all the content that is classified with both tids 4 and 5, here is what the path would look like:


Notice that the comma (,) is used to separate the two tids. The comma functions as the AND operator; only content with classified with tid 4 AND tid 5 will be shown. If you would like to see content with tid 4 OR tid 5, use the plus (+) operator instead:


The list of terms can be arbitrarily long, but only one of the two operators should be used; don't mix the AND operator with the OR operator:

taxonomy/term/4,6,7,14,33 taxonomy/term/5+3+2+56+122

0 0

Post a comment