Skip to content

Commit

Permalink
[TASK] don't add classes 'btn btn-default' when link is 'whole area' …
Browse files Browse the repository at this point in the history
…in CE IconTextButton (#284)
  • Loading branch information
pixelmatseriks authored Oct 27, 2017
1 parent 787a5a8 commit 3ee4b3f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Resources/Private/Templates/ContentElements/IconTextButton.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<f:section name="Header" />
<f:section name="Main">
<!-- theme_t3kit: Templates/ContentElements/IconTextButton.html [begin] -->
<f:comment>
<!--
Use a variable to set anchor class.
Leave empty if both disableWholeAreaLink and btnAsLink aren't set
Don't want classes btn btn-default when link is on "whole area"
-->
</f:comment>
<f:variable name="anchorClass">{f:if(condition: '{settings.disableWholeAreaLink} != 1 && {settings.btnAsLink} != 1' , then: '', else: ' btn btn-default')}</f:variable>

<div class="icon-text-btn__wrp">
<div class="icon-text-btn{f:if(condition: settings.disableWholeAreaLink, then: '', else: ' _whole-area-link')}">
<h3 class="icon-text-btn__header">
Expand All @@ -20,10 +29,10 @@ <h3 class="icon-text-btn__header">
<f:if condition="{data.header_link}">
<f:if condition="{data.subheader}">
<f:then>
<f:link.typolink parameter="{data.header_link}" class="icon-text-btn__link {f:if(condition: settings.btnAsLink, then: '', else: 'btn btn-default')}">{data.subheader}</f:link.typolink>
<f:link.typolink parameter="{data.header_link}" class="icon-text-btn__link{anchorClass}">{data.subheader}</f:link.typolink>
</f:then>
<f:else>
<f:link.typolink parameter="{data.header_link}" class="icon-text-btn__link {f:if(condition: settings.btnAsLink, then: '', else: 'btn btn-default')}">{data.header}</f:link.typolink>
<f:link.typolink parameter="{data.header_link}" class="icon-text-btn__link{anchorClass}">{data.header}</f:link.typolink>
</f:else>
</f:if>
</f:if>
Expand Down

0 comments on commit 3ee4b3f

Please sign in to comment.