Trying to hide icon from Tabs #6131
-
I would like to hide the Thing is, that I cannot figure out which partial is responsible for it. I tried this setup. See Line 3 for the edit: {% macro render_content(nav_item, ref = nav_item) %}
{% if nav_item == ref or "navigation.indexes" in features %}
{% if nav_item.is_index and nav_item.meta.icon and not nav_item.meta.hide_icon %}
{% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %}
{% endif %}
{% endif %}
{{ ref.title }}
{% endmacro %}
{% macro render(nav_item, ref = nav_item) %}
{% set class = "md-tabs__item" %}
{% if ref.active %}
{% set class = class ~ " md-tabs__item--active" %}
{% endif %}
{% if nav_item.children %}
{% set first = nav_item.children | first %}
{% if first.children %}
{{ render(first, ref) }}
{% else %}
<li class="{{ class }}">
<a href="{{ first.url | url }}" class="md-tabs__link">
{{ render_content(first, ref) }}
</a>
</li>
{% endif %}
{% else %}
<li class="{{ class }}">
<a href="{{ nav_item.url | url }}" class="md-tabs__link">
{{ render_content(nav_item) }}
</a>
</li>
{% endif %}
{% endmacro %} Also, before asking:
Any ideas why it doesn't work? Am I editing the wrong partial? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks, @kamilkrzyskow, for applying your eagle eyes! |
Beta Was this translation helpful? Give feedback.
@Andre601 Without running the project, I see that you named the partial as
tabs_item.html
instead oftabs-item.html
EDIT: I made a typo myself while writing the message 😳