Conditional should evaluate a list with n items and check if one item equals current_url

My conditional is

```{{ if related_doz_list == current_url }}

This works fine, when the list contains only one item. My problem: The conditional should also be true, when there are two or more items in the list.

current_url = /lecturer/peter-miller

related_doz has the entries

  • /lecturer/peter-miller
    • /lecturer/stephen-smith

Then my conditional is TRUE, since Peter Miller is part of the list.
Same for current_url = /lecturer/stephen-smith

When current_url = /lecturer/mary-meeker, then FALSE

So, what I need is a "is part of" or "contains" operator. I looked fur such an operator on the Statamic Consitional page, but couldnĀ“t find something.

How can I achive this?

>>>>>>> Unanswered <<<<<<<
1 Reply