Skip to content

Commit

Permalink
Merge pull request #1773 from bolt/test/db-supports-json
Browse files Browse the repository at this point in the history
Test/db supports json
  • Loading branch information
bobdenotter authored Aug 26, 2020
2 parents 85c44d3 + 209b79d commit 8842feb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions public/theme/skeleton/custom/setcontent_1.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endmacro %}

{% macro contains(needle, haystack) %}
{% if needle in haystack %}[yes]{% else %}[no]{% endif %}
{% if needle|lower in haystack|lower %}[yes]{% else %}[no]{% endif %}
{% endmacro %}

{% block main %}
Expand Down Expand Up @@ -124,7 +124,7 @@
{% for entry in entries %}
<li>
{{ entry.contenttype }} {{ entry.id }} . {{ entry|title }}
{% if 'voluptat' in entry|title or 'porro' in entry|title %}[yes]{% else %}[no]{% endif %}
{% if 'voluptat' in entry|title|lower or 'porro' in entry|title|lower %}[yes]{% else %}[no]{% endif %}
</li>
{% set last = entry.id %}
{% endfor %}
Expand Down Expand Up @@ -160,7 +160,7 @@
{% endfor %}

<ul>
<li>Two different random results: [{{ first_ids === second_ids ? "no" : "yes" }}]</li>
<li>Two different random results: {{ first_ids === second_ids ? "[no]" : "[yes]" }}</li>
</ul>
</section>

Expand All @@ -178,4 +178,16 @@
{% endfor %}
</ul>
</section>

<section id="twelve">
<h1>Twelve</h1>
{% setcontent about = 'blocks/about' %}
<ul>
{% if about.title == 'About This Site' %}
<li>{{ about.title }} [yes]</li>
{% else %}
<li>[no]</li>
{% endif %}
</ul>
</section>
{% endblock main %}

0 comments on commit 8842feb

Please sign in to comment.