You are here

views-view-field--portfolio-terms--name.html.twig in Multipurpose Corporate Profile 8

{% set active = " " %}
{% if '/portfolio/column_three' in current_path %}
    {% if current_path|last == row.tid  %}
        {% set active = "active" %}
    {% endif %}
    <a href="/portfolio/column_three/{{ row.tid }}" class="{{ active }}">{{ view.field.name.original_value|striptags }} </a>
{% elseif '/portfolio/column_four' in current_path %}
    {% if current_path|last == row.tid  %}
        {% set active = "active" %}
    {% endif %}
    <a href="/portfolio/column_four/{{ row.tid }}" class="{{ active }}">{{ view.field.name.original_value|striptags }} </a>
{% else %}
    {% if current_path|last == row.tid  %}
        {% set active = "active" %}
    {% endif %}
    <a href="/portfolio/{{ row.tid }}" class="{{ active }}" > {{ view.field.name.original_value|striptags }} </a>
{% endif %}

File

templates/views-view-field--portfolio-terms--name.html.twig
View source
  1. {% set active = " " %}
  2. {% if '/portfolio/column_three' in current_path %}
  3. {% if current_path|last == row.tid %}
  4. {% set active = "active" %}
  5. {% endif %}
  6. <a href="/portfolio/column_three/{{ row.tid }}" class="{{ active }}">{{ view.field.name.original_value|striptags }} </a>
  7. {% elseif '/portfolio/column_four' in current_path %}
  8. {% if current_path|last == row.tid %}
  9. {% set active = "active" %}
  10. {% endif %}
  11. <a href="/portfolio/column_four/{{ row.tid }}" class="{{ active }}">{{ view.field.name.original_value|striptags }} </a>
  12. {% else %}
  13. {% if current_path|last == row.tid %}
  14. {% set active = "active" %}
  15. {% endif %}
  16. <a href="/portfolio/{{ row.tid }}" class="{{ active }}" > {{ view.field.name.original_value|striptags }} </a>
  17. {% endif %}