Check if page is Search, use different classes I'm looking for a shorter way of writing this check. If the user visits the search page, apply the 3 column to the search-block, else use the 5 column:

{% set currentPage = 'search' %}
{% if currentPage == "search" %}
   {% for project in pageEntries %}
      {% include '_partials/search-block' with {
         extraClasses: '3col'                    
         } 
      %}
   {% endfor %}
{% else %}
   {% for project in pageEntries %}
      {% include '_partials/search-block' with {
         extraClasses: '5col'                    
         } 
      %}
   {% endfor %}
{% endif %}
{% set class = (currentPage == "search")? '5col' : '3col' %} 
{% for project in pageEntries %}
     {% include '_partials/search-block' with { 
        extraClasses: class
     } %} 
{% endfor %}