Skip to content

Commit

Permalink
Hide hero button if no text for label entered
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Berkley committed Aug 6, 2019
1 parent 9011cd8 commit 0ef268d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Views/Widget-Hero.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<div class="hero">
<div class="hero__body">
<h1 class="hero__title">{{ Model.ContentItem.Content.Hero.DisplayText.Text | raw }}</h1>
<a href="{{ Model.ContentItem.Content.Hero.CTAUrl.Text | href }}" class="btn__btn btn btn--primary">{{ Model.ContentItem.Content.Hero.CTALabel.Text | raw }}</a>
{% if Model.ContentItem.Content.Hero.CTALabel.Text != nil %}
<a href="{{ Model.ContentItem.Content.Hero.CTAUrl.Text | href }}" class="btn__btn btn btn--primary">{{ Model.ContentItem.Content.Hero.CTALabel.Text | raw }}</a>
{% endif %}
</div>

{% if backgroundType == "embed" %}
Expand All @@ -19,4 +21,4 @@
{% endif %}
</div>
</div>
</section>
</section>

0 comments on commit 0ef268d

Please sign in to comment.