1

I have a set of checkboxes to show content on a page. I have one instance where I'd like to show something if either checkboxes are selected. I have searched around but couldn't find how to combine multiple value. Here's what I have now

{% if entry.pageOptions.contains('testimonials') %} 

And I want it to be something like:

{% if entry.pageOptions.contains('anotheroption|testimonials') %} 

1 Answer 1

5

That contains test just does a smple string comparison. Try this:

{% if entry.pageOptions.contains('anotheroption')
     or entry.pageOptions.contains('testimonials') %}
1
  • That worked beautifully - so simple. Thank you!
    – glider
    Commented May 9, 2015 at 22:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.