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') %} 
5

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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