If multiple entry types? Is it possible to do the following?

{% if entry.type == 'overview' %}

    {{ entry.title }}

{% elseif entry.type == ['availability', 'specifications', 'sitemap', 'location'] %}

    {{ entry.title }}

{% else %}

    {{ entry.title }}

{% endif %}


At the minute it is not returning anything inside the elseif, can anyone spot anything wrong with the logic or is there an alternative method?
You were so close! Instead of asking whether entry.type is equal to the array (which it isn't), you need to find out whether the value of entry.type matches one of the array items.

Here is an updated snippet that should work for you:

{% if entry.type == 'overview' %}
    {{ entry.title }}
{% elseif entry.type.handle in ['availability', 'specifications', 'sitemap', 'location'] %}
    {{ entry.title }}
{% else %}
    {{ entry.title }}
{% endif %}




EDIT:

It's important to recognize that entry.type is actually an object. When checking a value using in, the object's __toString method will not be invoked. Therefore you'll need explicitly specify entry.type.handle when testing whether the type is in an array.