Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/db supports json #1773

Merged
merged 7 commits into from
Aug 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}