vendor/store.shopware.com/huebertseofaq/src/Resources/views/storefront/seoFaq/seoFaq.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_content %}
  3.     {{ parent() }}
  4.     {% block seo_faq_json %}
  5.         <template js-SeoFaq></template>
  6.         <script type="application/ld+json">
  7.                 {
  8.                     "@context" : "http://schema.org",
  9.                     "@type" : "FAQPage",
  10.                     "mainEntity": [
  11.                     {% if page.questionSpecific %}
  12.                     {
  13.                         "@type": "Question",
  14.                         "name": "{{ page.questionSpecific.question }}",
  15.                         "acceptedAnswer": {
  16.                             "@type": "Answer",
  17.                             "text": "{{ page.questionSpecific.answer }}"
  18.                             }
  19.                     },
  20.                     {% else %}
  21.             {% for entry in page.question %}
  22.                     {
  23.                         "@type": "Question",
  24.                         "name": "{{ entry.question }}",
  25.                         "acceptedAnswer": {
  26.                             "@type": "Answer",
  27.                             "text": "{{ entry.answer }}"
  28.                             }
  29.                     }
  30.             {% if not loop.last %},{% endif %}
  31.             {% endfor %}
  32.             {% endif %}
  33.                     ]
  34.                 }
  35.         </script>
  36.     {% endblock %}
  37.     {% block seo_faq_qa %}
  38.         {% for entryGroup in page.group %}{% if entryGroup.salesChannelId == context.salesChannel.id or not entryGroup.salesChannelId %}
  39.             {% set showHeadline = true %}
  40.             {% for entry in page.question|sort((a, b) => a.elements.first.questionPosition <=> b.elements.first.questionPosition) %}
  41. {#                {{ dump(entry) }}#}
  42.                 {% if entry.translated.question and entry.group == entryGroup.id and entryGroup.active %}
  43.                     {% if showHeadline %}
  44.                         <h3 class="hueb-seo-faq__group">{{ entryGroup.translated.name }}</h3>
  45.                         {% set showHeadline = false %}
  46.                     {% endif %}
  47.                     <div id="{{ entry.extensions.questionUrl }}_box" class="hueb-seo-faq__box">
  48.                         <div class="hueb-seo-faq__question col-md-12">
  49.                             <a class="faq-link" href="{{ path('frontend.seoFaq.question', {'question': entry.extensions.questionUrl})|replace({"%3F": "?", '%27': "'", '%28' : "(", '%29' : ')', '%3B':';',  '%3A':':', '%26':'&', '%3D' : '=',  '%24' : '$', '%2C': ',', '%2F' : '', '%25':'%', '%23' : '#', '%5B' : '[', '%5D' : ']', '%5E': '^', '%7B':'{', "%7D":'}'}) }}" title="{{ entry.translated.question }}">
  50.                                 <span class="hueb-seo-faq__toggle --active" id="{{ entry.extensions.questionUrl }}_plus">+</span>
  51.                                 <span class="hueb-seo-faq__toggle minus" id="{{ entry.extensions.questionUrl }}_minus">-</span>
  52.                                 {{ entry.translated.question }}
  53.                             </a>
  54.                         </div>
  55.                         <div id="{{ entry.extensions.questionUrl }}" class="hueb-seo-faq__answer col-md-12">
  56.                             <div class="hueb-seo-faq__answer-content">{{ entry.translated.answer|raw }}</div>
  57.                         </div>
  58.                     </div>
  59.                 {% endif %}
  60.             {% endfor %}
  61.         {% endif %}{% endfor %}
  62.     {% endblock %}
  63. {% endblock %}