Skip to content

Commit bc24e99

Browse files
committed
Do something different if there's only 1 dynamic text
1 parent 6663d23 commit bc24e99

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
<div>
22
{% if value.static_text %}<span>{{ value.static_text }}</span>{% endif %}
33
{% if value.dynamic_text %}
4-
<ul>
4+
{% if value.dynamic_text|length > 1 %}
5+
{# If there's more than one dynamic text, show the controls for the loop. #}
6+
<ul>
7+
{% for text in value.dynamic_text %}
8+
<li>{{ text }}</li>
9+
{% endfor %}
10+
</ul>
11+
{% else %}
12+
{# If there's only one dynamic text, don't show the controls for the loop. #}
513
{% for text in value.dynamic_text %}
6-
<li>{{ text }}</li>
14+
<span>{{ text }}</span>
715
{% endfor %}
8-
</ul>
16+
{% endif %}
917
{% endif %}
1018
</div>

0 commit comments

Comments
 (0)