From cee2ed82e3b4732d1205496c1855ccc5a2a81846 Mon Sep 17 00:00:00 2001 From: Jeroen Goddijn <48567344+JeroenGoddijn@users.noreply.github.com> Date: Wed, 21 Aug 2019 13:20:44 -0500 Subject: [PATCH] Make slider/carousel button conditional If user does not specify/want a button on a slide, the template still shows an empty button border/rectangle. Making the button conditional based on whether it's defined in the .md file, makes sure the button only shows when specified/desired. --- templates/modular/showcase.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/modular/showcase.html.twig b/templates/modular/showcase.html.twig index 018fea6..e6d3574 100644 --- a/templates/modular/showcase.html.twig +++ b/templates/modular/showcase.html.twig @@ -4,7 +4,7 @@

{{ slide.heading }}

{{ slide.subheading }}

- {{ slide.button_text }} + {% if slide.button_text %}{{ slide.button_text }}{% endif %}
{% endfor %}