forked from BitBagCommerce/SyliusCmsPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.twig
executable file
·42 lines (39 loc) · 1.51 KB
/
index.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends '@SyliusShop/layout.html.twig' %}
{% import '@SyliusUi/Macro/messages.html.twig' as messages %}
{% block content %}
<div class="ui stackable grid segment">
<div id="bitbag-faqs" class="ui sixteen wide column">
{% if resources|length > 0 %}
<div class="ui one column stackable grid">
{% for frequentlyAskedQuestion in resources %}
<div class="bitbag-frequently-asked-question">
{% include '@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/Index/_show.html.twig' %}
</div>
{% endfor %}
</div>
{% else %}
{{ messages.info('sylius.ui.no_results_to_display') }}
{% endif %}
</div>
</div>
{% if resources|length > 0 %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{% for frequentlyAskedQuestion in resources %}
{
"@type": "Question",
"name": "{{ frequentlyAskedQuestion.question }}",
"acceptedAnswer": {
"@type": "Answer",
"text": "{{ frequentlyAskedQuestion.answer|striptags|escape }}"
}
}{% if not loop.last %},{% endif %}
{% endfor %}
]
}
</script>
{% endif %}
{% endblock %}