<?php
use Twig\Environment;
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;
/* frontend/product/index.html.twig */
class __TwigTemplate_cb8789f32bc44ddfbbdf791c8ad2c35f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'metaTitle' => [$this, 'block_metaTitle'],
'metaDescription' => [$this, 'block_metaDescription'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "frontend/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", "frontend/product/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/product/index.html.twig"));
// line 3
$macros["__internal_parse_0"] = $this->macros["__internal_parse_0"] = $this->loadTemplate("frontend/partials/_realizations.html.twig", "frontend/product/index.html.twig", 3)->unwrap();
// line 1
$this->parent = $this->loadTemplate("frontend/base.html.twig", "frontend/product/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_metaTitle($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", "metaTitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaTitle"));
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "metaTitle", [], "any", true, true, false, 5)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "metaTitle", [], "any", false, false, false, 5), twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 5, $this->source); })()), "name", [], "any", false, false, false, 5))) : (twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 5, $this->source); })()), "name", [], "any", false, false, false, 5))), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
public function block_metaDescription($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", "metaDescription"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metaDescription"));
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "metaDescription", [], "any", true, true, false, 6)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["product"] ?? null), "metaDescription", [], "any", false, false, false, 6), twig_slice($this->env, $this->extensions['App\Twig\AppExtension']->html_entity_decode(twig_striptags($this->extensions['OneAM\Libraries\BlockEditor\Twig\TwigExtension']->renderContent($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 6, $this->source); })()), "introduction", [], "any", false, false, false, 6)))), 0, 200))) : (twig_slice($this->env, $this->extensions['App\Twig\AppExtension']->html_entity_decode(twig_striptags($this->extensions['OneAM\Libraries\BlockEditor\Twig\TwigExtension']->renderContent($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 6, $this->source); })()), "introduction", [], "any", false, false, false, 6)))), 0, 200))), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 8
public function block_body($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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 9
echo " ";
$this->loadTemplate("frontend/partials/_breadcrumb.html.twig", "frontend/product/index.html.twig", 9)->display($context);
// line 10
echo "
<section class=\"space-1\">
<div class=\"container\">
<h5 class=\"h4 mb-4 fw-medium\">
";
// line 14
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Sei nell’area", [], "messages");
echo " ";
echo twig_escape_filter($this->env, twig_lower_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 14, $this->source); })()), "name", [], "any", false, false, false, 14)), "html", null, true);
echo ".
";
// line 15
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Scorrendo la pagina troverai informazioni, cataloghi e promozioni che ti aiuteranno nella scelta del prodotto giusto per le tue esigenze.", [], "messages");
// line 16
echo " </h5>
<div class=\"position-relative mb-4\">
<div class=\"d-lg-none\">
<figure class=\"media equal-1-1\">
<span style=\"background-image: url('";
// line 20
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 20, $this->source); })()), "cover", [], "any", false, false, false, 20), "publicUrl", [], "any", false, false, false, 20), "html", null, true);
echo "')\"></span>
</figure>
</div>
<div class=\"d-none d-lg-block\">
<figure class=\"media equal-2-1\">
<span style=\"background-image: url('";
// line 25
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 25, $this->source); })()), "cover", [], "any", false, false, false, 25), "publicUrl", [], "any", false, false, false, 25), "html", null, true);
echo "')\"></span>
</figure>
</div>
</div>
</div>
</section>
<section class=\"space-1\">
<div class=\"container\">
";
// line 33
echo $this->extensions['OneAM\Libraries\BlockEditor\Twig\TwigExtension']->renderContent($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 33, $this->source); })()), "introduction", [], "any", false, false, false, 33));
echo "
</div>
</section>
";
// line 36
echo twig_call_macro($macros["__internal_parse_0"], "macro_realization_slider", [twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 36, $this->source); })()), "realizations", [], "any", false, false, false, 36)], 36, $context, $this->getSourceContext());
echo "
<section class=\"space-2\">
<div class=\"container\">
";
// line 39
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 39, $this->source); })()), "sections", [], "any", false, false, false, 39));
$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["section"]) {
// line 40
echo " <div class=\"row align-items-center justify-content-center space-top-1 space-top-lg-2 space-bottom-lg-1\">
<div class=\"col-lg-5 ps-lg-5 ";
// line 41
echo ((((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 41) % 2) == 0)) ? ("order-lg-1") : (""));
echo "\">
<h3 class=\"text-uppercase text-primary display-5 fw-bold mb-2 mb-lg-4\" style=\"line-height: 1\">
";
// line 43
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 43)) ? (twig_get_attribute($this->env, $this->source, $context["section"], "title", [], "any", false, false, false, 43)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 43), "name", [], "any", false, false, false, 43))), "html", null, true);
echo "
</h3>
<p class=\"fs-lg\">
";
// line 46
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 46)) ? (twig_get_attribute($this->env, $this->source, $context["section"], "description", [], "any", false, false, false, 46)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 46), "introduction", [], "any", false, false, false, 46))), "html", null, true);
echo "
</p>
<a href=\"";
// line 48
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 48)) ? (twig_get_attribute($this->env, $this->source, $context["section"], "link", [], "any", false, false, false, 48)) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("frontend_product_page_index", ["product" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 48), "product", [], "any", false, false, false, 48), "slug", [], "any", false, false, false, 48), "page" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 48), "slug", [], "any", false, false, false, 48)]))), "html", null, true);
echo "\"
class=\"btn btn-primary text-uppercase fw-bold mb-4 mb-lg-0\"
aria-label=\"";
// line 50
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 50)) ? (twig_get_attribute($this->env, $this->source, $context["section"], "title", [], "any", false, false, false, 50)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 50), "name", [], "any", false, false, false, 50))), "html", null, true);
echo "\"
>";
// line 51
echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Scopri di più", [], "messages");
echo "</a>
</div>
<div class=\"col-lg-5 ";
// line 53
echo ((((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 53) % 2) == 0)) ? ("order-lg-0") : (""));
echo "\">
<img src=\"";
// line 54
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 54)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "cover", [], "any", false, false, false, 54), "publicUrl", [], "any", false, false, false, 54)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 54), "cover", [], "any", false, false, false, 54), "publicUrl", [], "any", false, false, false, 54))), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["section"], "custom", [], "any", false, false, false, 54)) ? (twig_get_attribute($this->env, $this->source, $context["section"], "title", [], "any", false, false, false, 54)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["section"], "page", [], "any", false, false, false, 54), "name", [], "any", false, false, false, 54))), "html", null, true);
echo "\"
class=\"img-fluid\">
</div>
</div>
";
++$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['section'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 59
echo " </div>
</section>
<section class=\"space-bottom-2\">
<div class=\"container\">
<div class=\"row justify-content-center\">
";
// line 64
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 64, $this->source); })()), "productCallToActions", [], "any", false, false, false, 64));
$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["productCallToAction"]) {
// line 65
echo " ";
$this->loadTemplate("frontend/partials/_call_to_action_card.html.twig", "frontend/product/index.html.twig", 65)->display(twig_array_merge($context, ["callToAction" => twig_get_attribute($this->env, $this->source, $context["productCallToAction"], "callToAction", [], "any", false, false, false, 65), "size" => twig_get_attribute($this->env, $this->source, $context["productCallToAction"], "size", [], "any", false, false, false, 65)]));
// line 66
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['productCallToAction'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 67
echo " </div>
</div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "frontend/product/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 281 => 67, 267 => 66, 264 => 65, 247 => 64, 240 => 59, 219 => 54, 215 => 53, 210 => 51, 206 => 50, 201 => 48, 196 => 46, 190 => 43, 185 => 41, 182 => 40, 165 => 39, 159 => 36, 153 => 33, 142 => 25, 134 => 20, 128 => 16, 126 => 15, 120 => 14, 114 => 10, 111 => 9, 101 => 8, 82 => 6, 63 => 5, 52 => 1, 50 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'frontend/base.html.twig' %}
{% from 'frontend/partials/_realizations.html.twig' import realization_slider %}
{% block metaTitle %}{{ product.metaTitle|default(product.name) }}{% endblock %}
{% block metaDescription %}{{ product.metaDescription|default(product.introduction|block_editor_render|striptags|html_entity_decode|slice(0, 200)) }}{% endblock %}
{% block body %}
{% include 'frontend/partials/_breadcrumb.html.twig' %}
<section class=\"space-1\">
<div class=\"container\">
<h5 class=\"h4 mb-4 fw-medium\">
{% trans %}Sei nell’area{% endtrans%} {{ product.name|lower }}.
{% trans %}Scorrendo la pagina troverai informazioni, cataloghi e promozioni che ti aiuteranno nella scelta del prodotto giusto per le tue esigenze.{% endtrans%}
</h5>
<div class=\"position-relative mb-4\">
<div class=\"d-lg-none\">
<figure class=\"media equal-1-1\">
<span style=\"background-image: url('{{ product.cover.publicUrl }}')\"></span>
</figure>
</div>
<div class=\"d-none d-lg-block\">
<figure class=\"media equal-2-1\">
<span style=\"background-image: url('{{ product.cover.publicUrl }}')\"></span>
</figure>
</div>
</div>
</div>
</section>
<section class=\"space-1\">
<div class=\"container\">
{{ product.introduction|block_editor_render }}
</div>
</section>
{{ realization_slider(product.realizations) }}
<section class=\"space-2\">
<div class=\"container\">
{% for section in product.sections %}
<div class=\"row align-items-center justify-content-center space-top-1 space-top-lg-2 space-bottom-lg-1\">
<div class=\"col-lg-5 ps-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-1' }}\">
<h3 class=\"text-uppercase text-primary display-5 fw-bold mb-2 mb-lg-4\" style=\"line-height: 1\">
{{ section.custom ? section.title : section.page.name }}
</h3>
<p class=\"fs-lg\">
{{ section.custom ? section.description : section.page.introduction }}
</p>
<a href=\"{{ section.custom ? section.link : path('frontend_product_page_index', {product: section.page.product.slug, page: section.page.slug}) }}\"
class=\"btn btn-primary text-uppercase fw-bold mb-4 mb-lg-0\"
aria-label=\"{{ section.custom ? section.title : section.page.name }}\"
>{% trans %}Scopri di più{% endtrans %}</a>
</div>
<div class=\"col-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-0' }}\">
<img src=\"{{ section.custom ? section.cover.publicUrl : section.page.cover.publicUrl }}\" alt=\"{{ section.custom ? section.title : section.page.name }}\"
class=\"img-fluid\">
</div>
</div>
{% endfor %}
</div>
</section>
<section class=\"space-bottom-2\">
<div class=\"container\">
<div class=\"row justify-content-center\">
{% for productCallToAction in product.productCallToActions %}
{% include 'frontend/partials/_call_to_action_card.html.twig' with {callToAction: productCallToAction.callToAction, size: productCallToAction.size} %}
{% endfor %}
</div>
</div>
</section>
{% endblock %}
", "frontend/product/index.html.twig", "/var/www/vhosts/dev.oneam.it/astralpool.dev.oneam.it/templates/frontend/product/index.html.twig");
}
}