<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig */
class __TwigTemplate_79862c919350acf7303919ea641bd6d1 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'base_content' => [$this, 'block_base_content'],
'seo_faq_json' => [$this, 'block_seo_faq_json'],
'seo_faq_qa' => [$this, 'block_seo_faq_qa'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@EfbStorefront/storefront/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig"));
$this->parent = $this->loadTemplate("@EfbStorefront/storefront/base.html.twig", "@HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_base_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "base_content"));
// line 4
echo " ";
$this->displayParentBlock("base_content", $context, $blocks);
echo "
";
// line 6
$this->displayBlock('seo_faq_json', $context, $blocks);
// line 40
echo "
";
// line 41
$this->displayBlock('seo_faq_qa', $context, $blocks);
// line 68
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
public function block_seo_faq_json($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo_faq_json"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo_faq_json"));
// line 7
echo " <template js-SeoFaq></template>
<script type=\"application/ld+json\">
{
\"@context\" : \"http://schema.org\",
\"@type\" : \"FAQPage\",
\"mainEntity\": [
";
// line 13
if (sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "questionSpecific", [], "any", false, false, false, 13)) {
// line 14
echo " {
\"@type\": \"Question\",
\"name\": \"";
// line 16
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "questionSpecific", [], "any", false, false, false, 16), "question", [], "any", false, false, false, 16), "html", null, true);
echo "\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"";
// line 19
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "questionSpecific", [], "any", false, false, false, 19), "answer", [], "any", false, false, false, 19), "html", null, true);
echo "\"
}
},
";
} else {
// line 23
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "question", [], "any", false, false, false, 23));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 24
echo " {
\"@type\": \"Question\",
\"name\": \"";
// line 26
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["entry"], "question", [], "any", false, false, false, 26), "html", null, true);
echo "\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"";
// line 29
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, $context["entry"], "answer", [], "any", false, false, false, 29), "html", null, true);
echo "\"
}
}
";
// line 32
if ( !sw_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 32)) {
echo ",";
}
// line 33
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 35
echo " ]
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 41
public function block_seo_faq_qa($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo_faq_qa"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "seo_faq_qa"));
// line 42
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "group", [], "any", false, false, false, 42));
foreach ($context['_seq'] as $context["_key"] => $context["entryGroup"]) {
if (((sw_get_attribute($this->env, $this->source, $context["entryGroup"], "salesChannelId", [], "any", false, false, false, 42) == sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, false, false, 42), "id", [], "any", false, false, false, 42)) || !sw_get_attribute($this->env, $this->source, $context["entryGroup"], "salesChannelId", [], "any", false, false, false, 42))) {
// line 43
echo " ";
$context["showHeadline"] = true;
// line 44
echo "
";
// line 45
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['Shopware\Core\Framework\Adapter\Twig\SecurityExtension']->sort(sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "question", [], "any", false, false, false, 45), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["a"] ?? null), "elements", [], "any", false, false, false, 45), "first", [], "any", false, false, false, 45), "questionPosition", [], "any", false, false, false, 45) <=> sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["b"] ?? null), "elements", [], "any", false, false, false, 45), "first", [], "any", false, false, false, 45), "questionPosition", [], "any", false, false, false, 45)); }));
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 47
echo " ";
if (((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "translated", [], "any", false, false, false, 47), "question", [], "any", false, false, false, 47) && (sw_get_attribute($this->env, $this->source, $context["entry"], "group", [], "any", false, false, false, 47) == sw_get_attribute($this->env, $this->source, $context["entryGroup"], "id", [], "any", false, false, false, 47))) && sw_get_attribute($this->env, $this->source, $context["entryGroup"], "active", [], "any", false, false, false, 47))) {
// line 48
echo " ";
if (($context["showHeadline"] ?? null)) {
// line 49
echo " <h3 class=\"hueb-seo-faq__group\">";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entryGroup"], "translated", [], "any", false, false, false, 49), "name", [], "any", false, false, false, 49), "html", null, true);
echo "</h3>
";
// line 50
$context["showHeadline"] = false;
// line 51
echo " ";
}
// line 52
echo " <div id=\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "extensions", [], "any", false, false, false, 52), "questionUrl", [], "any", false, false, false, 52), "html", null, true);
echo "_box\" class=\"hueb-seo-faq__box\">
<div class=\"hueb-seo-faq__question col-md-12\">
<a class=\"faq-link\" href=\"";
// line 54
echo sw_escape_filter($this->env, twig_replace_filter($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend.seoFaq.question", ["question" => sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "extensions", [], "any", false, false, false, 54), "questionUrl", [], "any", false, false, false, 54)]), ["%3F" => "?", "%27" => "'", "%28" => "(", "%29" => ")", "%3B" => ";", "%3A" => ":", "%26" => "&", "%3D" => "=", "%24" => "\$", "%2C" => ",", "%2F" => "", "%25" => "%", "%23" => "#", "%5B" => "[", "%5D" => "]", "%5E" => "^", "%7B" => "{", "%7D" => "}"]), "html", null, true);
echo "\" title=\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "translated", [], "any", false, false, false, 54), "question", [], "any", false, false, false, 54), "html", null, true);
echo "\">
<span class=\"hueb-seo-faq__toggle --active\" id=\"";
// line 55
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "extensions", [], "any", false, false, false, 55), "questionUrl", [], "any", false, false, false, 55), "html", null, true);
echo "_plus\">+</span>
<span class=\"hueb-seo-faq__toggle minus\" id=\"";
// line 56
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "extensions", [], "any", false, false, false, 56), "questionUrl", [], "any", false, false, false, 56), "html", null, true);
echo "_minus\">-</span>
";
// line 57
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "translated", [], "any", false, false, false, 57), "question", [], "any", false, false, false, 57), "html", null, true);
echo "
</a>
</div>
<div id=\"";
// line 60
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "extensions", [], "any", false, false, false, 60), "questionUrl", [], "any", false, false, false, 60), "html", null, true);
echo "\" class=\"hueb-seo-faq__answer col-md-12\">
<div class=\"hueb-seo-faq__answer-content\">";
// line 61
echo sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["entry"], "translated", [], "any", false, false, false, 61), "answer", [], "any", false, false, false, 61);
echo "</div>
</div>
</div>
";
}
// line 65
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 66
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entryGroup'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 292 => 67, 285 => 66, 279 => 65, 272 => 61, 268 => 60, 262 => 57, 258 => 56, 254 => 55, 248 => 54, 242 => 52, 239 => 51, 237 => 50, 232 => 49, 229 => 48, 226 => 47, 222 => 45, 219 => 44, 216 => 43, 210 => 42, 200 => 41, 186 => 35, 183 => 34, 169 => 33, 165 => 32, 159 => 29, 153 => 26, 149 => 24, 131 => 23, 124 => 19, 118 => 16, 114 => 14, 112 => 13, 104 => 7, 94 => 6, 83 => 68, 81 => 41, 78 => 40, 76 => 6, 70 => 4, 60 => 3, 37 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_content %}
{{ parent() }}
{% block seo_faq_json %}
<template js-SeoFaq></template>
<script type=\"application/ld+json\">
{
\"@context\" : \"http://schema.org\",
\"@type\" : \"FAQPage\",
\"mainEntity\": [
{% if page.questionSpecific %}
{
\"@type\": \"Question\",
\"name\": \"{{ page.questionSpecific.question }}\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"{{ page.questionSpecific.answer }}\"
}
},
{% else %}
{% for entry in page.question %}
{
\"@type\": \"Question\",
\"name\": \"{{ entry.question }}\",
\"acceptedAnswer\": {
\"@type\": \"Answer\",
\"text\": \"{{ entry.answer }}\"
}
}
{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
]
}
</script>
{% endblock %}
{% block seo_faq_qa %}
{% for entryGroup in page.group %}{% if entryGroup.salesChannelId == context.salesChannel.id or not entryGroup.salesChannelId %}
{% set showHeadline = true %}
{% for entry in page.question|sort((a, b) => a.elements.first.questionPosition <=> b.elements.first.questionPosition) %}
{# {{ dump(entry) }}#}
{% if entry.translated.question and entry.group == entryGroup.id and entryGroup.active %}
{% if showHeadline %}
<h3 class=\"hueb-seo-faq__group\">{{ entryGroup.translated.name }}</h3>
{% set showHeadline = false %}
{% endif %}
<div id=\"{{ entry.extensions.questionUrl }}_box\" class=\"hueb-seo-faq__box\">
<div class=\"hueb-seo-faq__question col-md-12\">
<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 }}\">
<span class=\"hueb-seo-faq__toggle --active\" id=\"{{ entry.extensions.questionUrl }}_plus\">+</span>
<span class=\"hueb-seo-faq__toggle minus\" id=\"{{ entry.extensions.questionUrl }}_minus\">-</span>
{{ entry.translated.question }}
</a>
</div>
<div id=\"{{ entry.extensions.questionUrl }}\" class=\"hueb-seo-faq__answer col-md-12\">
<div class=\"hueb-seo-faq__answer-content\">{{ entry.translated.answer|raw }}</div>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}{% endfor %}
{% endblock %}
{% endblock %}
", "@HuebertSeoFaq/storefront/seoFaq/seoFaq.html.twig", "/var/www/share/efb-elektronik.dev.mc.emzcustomers.de/shopware6/vendor/store.shopware.com/huebertseofaq/src/Resources/views/storefront/seoFaq/seoFaq.html.twig");
}
}