Skip to content

Commit

Permalink
Added a new ‘condition’ attribute for tab for logic to process if it …
Browse files Browse the repository at this point in the history
…should display or not
  • Loading branch information
rhukster committed Dec 12, 2020
1 parent cf227fa commit 395438f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/forms/fields/tabs/tabs.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<div class="tabs-nav">
{% for tab in tabs %}
{% if tab.type == 'tab' %}
{% if tab.type == 'tab' and (tab.condition is null or tab.condition == true) %}
<a class="tab__link {{ (storedTab == scope ~ tab.name) or active == loop.index ? 'active' : '' }}" data-tabid="tab-{{ tabsKey ~ loop.index }}" data-tabkey="tab-{{ tabsKey }}" data-scope="{{ scope ~ tab.name }}">
<span>{{ tab.title|t }}</span>
{% endif %}
Expand Down

0 comments on commit 395438f

Please sign in to comment.