<?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;
/* @BitBagSyliusCmsPlugin/Shop/Page/show.html.twig */
class __TwigTemplate_2509da607c98be9540b29fdeb4a7f2d49c210aff6a3f399ecb0bb023bec5afc1 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'banner' => [$this, 'block_banner'],
'title' => [$this, 'block_title'],
'head' => [$this, 'block_head'],
'stylesheets' => [$this, 'block_stylesheets'],
'metatags' => [$this, 'block_metatags'],
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 6
return $this->loadTemplate((isset($context["layout"]) || array_key_exists("layout", $context) ? $context["layout"] : (function () { throw new RuntimeError('Variable "layout" does not exist.', 6, $this->source); })()), "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 6);
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
// line 1
if ((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 1, $this->source); })()), "fullLayout", [], "any", false, false, false, 1) == true)) {
// line 2
$context["layout"] = "@SyliusShop/layout-full-width.html.twig";
} else {
// line 4
$context["layout"] = "@SyliusShop/layout.html.twig";
}
// line 9
$context["published"] = (( !(null === twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 9, $this->source); })()), "publishAt", [], "any", false, false, false, 9)) && (twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 9, $this->source); })()), "publishAt", [], "any", false, false, false, 9), "Y-m-d H:i:s") < twig_date_format_filter($this->env, "now", "Y-m-d H:i:s"))) || (null === twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 9, $this->source); })()), "publishAt", [], "any", false, false, false, 9)));
// line 11
$context["mainImage"] = null;
// line 12
if (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 12, $this->source); })()), "image", [], "any", false, false, false, 12)) {
// line 13
$context["mainImage"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 13, $this->source); })()), "image", [], "any", false, false, false, 13), "path", [], "any", false, false, false, 13);
}
// line 6
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 17
public function block_banner($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "banner"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "banner"));
// line 18
echo " ";
if ((((((twig_get_attribute($this->env, $this->source, // line 19
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 19, $this->source); })()), "code", [], "any", false, false, false, 19) != "conditions-d-utilisation") && (twig_get_attribute($this->env, $this->source, // line 20
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 20, $this->source); })()), "code", [], "any", false, false, false, 20) != "conditions-generales-de-vente")) && (twig_get_attribute($this->env, $this->source, // line 21
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 21, $this->source); })()), "code", [], "any", false, false, false, 21) != "mentions-legales")) && (twig_get_attribute($this->env, $this->source, // line 22
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 22, $this->source); })()), "code", [], "any", false, false, false, 22) != "politique-de-confidentialite")) && (twig_get_attribute($this->env, $this->source, // line 23
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 23, $this->source); })()), "template", [], "any", false, false, false, 23) != "structure"))) {
// line 25
echo " ";
if ($this->extensions['App\Twig\AppExtension']->templateFileExists((("@SyliusShop/Banner/_banner-" . twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 25, $this->source); })()), "code", [], "any", false, false, false, 25)) . ".html.twig"))) {
// line 26
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("odiseo_sylius_banner_plugin_shop_partial_banner", ["template" => (("@SyliusShop/Banner/_banner-" . twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 26, $this->source); })()), "code", [], "any", false, false, false, 26)) . ".html.twig")]));
echo "
";
} else {
// line 28
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("odiseo_sylius_banner_plugin_shop_partial_banner", ["template" => "@SyliusShop/Banner/_banner.html.twig"]));
echo "
";
}
// line 30
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 34
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 35
if (( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 35, $this->source); })()), "title", [], "any", false, false, false, 35)) && ((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 35, $this->source); })()) == true))) {
// line 36
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 36, $this->source); })()), "title", [], "any", false, false, false, 36), "html", null, true);
echo "
";
} else {
// line 38
echo " ";
$this->displayParentBlock("title", $context, $blocks);
echo "
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 43
public function block_head($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
// line 44
echo " ";
$this->displayParentBlock("head", $context, $blocks);
echo "
";
// line 46
$this->displayBlock('stylesheets', $context, $blocks);
// line 58
echo "
";
// line 59
$this->displayBlock('metatags', $context, $blocks);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 46
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 47
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
";
// line 49
if (((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 49, $this->source); })()), "code", [], "any", false, false, false, 49) == "contact") || (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 49, $this->source); })()), "template", [], "any", false, false, false, 49) == "structure"))) {
// line 50
echo " <script src='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
";
}
// line 53
echo "
";
// line 54
if (((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 54, $this->source); })()), "template", [], "any", false, false, false, 54) == "prestation") || (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 54, $this->source); })()), "template", [], "any", false, false, false, 54) == "structure"))) {
// line 55
echo " <link href='";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/shop/css/magnific-popup.css"), "html", null, true);
echo "' rel='stylesheet' />
";
}
// line 57
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 59
public function block_metatags($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metatags"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metatags"));
// line 60
echo " ";
$this->displayParentBlock("metatags", $context, $blocks);
echo "
";
// line 62
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 62, $this->source); })()) == true)) {
// line 63
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 63, $this->source); })()), "metaKeywords", [], "any", false, false, false, 63))) {
// line 64
echo " <meta name=\"keywords\" content=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 64, $this->source); })()), "metaKeywords", [], "any", false, false, false, 64), "html", null, true);
echo "\"/>
";
}
// line 66
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 66, $this->source); })()), "metaDescription", [], "any", false, false, false, 66))) {
// line 67
echo " <meta name=\"description\" content=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 67, $this->source); })()), "metaDescription", [], "any", false, false, false, 67), "html", null, true);
echo "\"/>
";
}
// line 69
echo "
<meta property=\"og:site_name\" content=\"Mons Fromage\" />
<meta property=\"og:locale\" content=\"";
// line 71
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 71, $this->source); })()), "localeCode", [], "any", false, false, false, 71), "html", null, true);
echo "\" />
<meta property=\"og:title\" content=\"";
// line 72
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 72, $this->source); })()), "title", [], "any", false, false, false, 72), "html_attr");
echo "\" />
<meta property=\"og:url\" content=\"";
// line 73
echo twig_escape_filter($this->env, ((isset($context["website_url"]) || array_key_exists("website_url", $context) ? $context["website_url"] : (function () { throw new RuntimeError('Variable "website_url" does not exist.', 73, $this->source); })()) . $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 73, $this->source); })()), "request", [], "any", false, false, false, 73), "attributes", [], "any", false, false, false, 73), "get", [0 => "_route"], "method", false, false, false, 73), twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 73, $this->source); })()), "request", [], "any", false, false, false, 73), "attributes", [], "any", false, false, false, 73), "get", [0 => "_route_params"], "method", false, false, false, 73))), "html", null, true);
echo "\" />
<meta property=\"og:type\" content=\"website\" />
<meta property=\"og:description\" content=\"";
// line 75
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 75, $this->source); })()), "metaDescription", [], "any", false, false, false, 75), "html_attr");
echo "\" />
<meta property=\"og:image\" content=\"";
// line 76
echo twig_escape_filter($this->env, (((isset($context["website_url"]) || array_key_exists("website_url", $context) ? $context["website_url"] : (function () { throw new RuntimeError('Variable "website_url" does not exist.', 76, $this->source); })()) . "/") . (isset($context["mainImage"]) || array_key_exists("mainImage", $context) ? $context["mainImage"] : (function () { throw new RuntimeError('Variable "mainImage" does not exist.', 76, $this->source); })())), "html", null, true);
echo "\" />
<meta name=\"twitter:card\" content=\"summary\" />
<meta name=\"twitter:title\" content=\"";
// line 79
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 79, $this->source); })()), "title", [], "any", false, false, false, 79), "html_attr");
echo "\" />
<meta name=\"twitter:description\" content=\"";
// line 80
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 80, $this->source); })()), "metaDescription", [], "any", false, false, false, 80), "html_attr");
echo "\" />
<meta name=\"twitter:image\" content=\"";
// line 81
echo twig_escape_filter($this->env, (((isset($context["website_url"]) || array_key_exists("website_url", $context) ? $context["website_url"] : (function () { throw new RuntimeError('Variable "website_url" does not exist.', 81, $this->source); })()) . "/") . (isset($context["mainImage"]) || array_key_exists("mainImage", $context) ? $context["mainImage"] : (function () { throw new RuntimeError('Variable "mainImage" does not exist.', 81, $this->source); })())), "html", null, true);
echo "\" />
";
}
// line 83
echo " ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 87
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 88
echo " ";
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 88, $this->source); })()) == true)) {
// line 89
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 89, $this->source); })()), "template", [], "any", false, false, false, 89))) {
// line 90
echo " ";
$this->loadTemplate((("bundles/BitBagSyliusCmsPlugin/Shop/Page/templates/_" . twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 90, $this->source); })()), "template", [], "any", false, false, false, 90)) . ".html.twig"), "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 90)->display($context);
// line 91
echo " ";
} else {
// line 92
echo " ";
$this->loadTemplate((("bundles/BitBagSyliusCmsPlugin/Shop/Page/" . twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 92, $this->source); })()), "code", [], "any", false, false, false, 92)) . ".html.twig"), "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 92)->display($context);
// line 93
echo " ";
}
// line 94
echo " ";
} else {
// line 95
echo " ";
$this->loadTemplate("bundles/BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 95)->display(twig_array_merge($context, ["publishAt" => twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 95, $this->source); })()), "publishAt", [], "any", false, false, false, 95)]));
// line 96
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 100
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 101
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
";
// line 103
if (((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 103, $this->source); })()), "template", [], "any", false, false, false, 103) == "prestation") || (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 103, $this->source); })()), "template", [], "any", false, false, false, 103) == "structure"))) {
// line 104
echo " <script src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/shop/js/jquery.magnific-popup.min.js"), "html", null, true);
echo "\"></script>
<script type=\"text/javascript\">
\$(document).ready(function (\$) {
\$('.";
// line 108
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 108, $this->source); })()), "template", [], "any", false, false, false, 108), "html", null, true);
echo "-details__galerie-images').magnificPopup({
delegate: 'a',
fixedContentPos: false,
midClick: true,
gallery:{
enabled:true
},
type: 'image'
});
});
</script>
";
}
// line 120
echo "
";
// line 121
if ((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 121, $this->source); })()), "template", [], "any", false, false, false, 121) == "structure")) {
// line 122
echo " <script type=\"text/javascript\">
// Display the map
mapboxgl.accessToken = '";
// line 126
echo twig_escape_filter($this->env, (isset($context["mapbox_key"]) || array_key_exists("mapbox_key", $context) ? $context["mapbox_key"] : (function () { throw new RuntimeError('Variable "mapbox_key" does not exist.', 126, $this->source); })()), "html", null, true);
echo "';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: [";
// line 131
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 131, $this->source); })()), "structureGpsLng", [], "any", false, false, false, 131), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 131, $this->source); })()), "structureGpsLat", [], "any", false, false, false, 131), "html", null, true);
echo "],
zoom: 13
});
var marker = new mapboxgl.Marker({
color: '#883412'
})
.setLngLat([";
// line 138
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 138, $this->source); })()), "structureGpsLng", [], "any", false, false, false, 138), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 138, $this->source); })()), "structureGpsLat", [], "any", false, false, false, 138), "html", null, true);
echo "])
.addTo(map);
var nav = new mapboxgl.NavigationControl();
map.addControl(nav, 'top-left');
</script>
";
}
// line 145
echo "
";
// line 146
if ((((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 146, $this->source); })()), "code", [], "any", false, false, false, 146) == "contact") || (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 146, $this->source); })()), "code", [], "any", false, false, false, 146) == "fromagers-evenementiels")) || (twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 146, $this->source); })()), "code", [], "any", false, false, false, 146) == "centre-international-mons-formation"))) {
// line 147
echo " <script src=\"https://www.google.com/recaptcha/api.js\"></script>
<script type=\"text/javascript\">
function onSubmitContactForm(token) {
\$(document).ready(function() {
\$(\"form#contact-form #recaptcha-token\").val(token);
var firstName = \$(\"form#contact-form input#sylius_contact_firstname\").val().trim();
var lastName = \$(\"form#contact-form input#sylius_contact_lastname\").val().trim();
var email = \$(\"form#contact-form input#sylius_contact_email\").val().trim();
var phone = \$(\"form#contact-form input#sylius_contact_phone\").val().trim();
var message = \$(\"form#contact-form #sylius_contact_message\").val().trim();
var emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))\$/;
var phoneRegex = /^(\\D*\\d){8,}\$/;
if((firstName === \"\") || (lastName === \"\") || (email === \"\") || (message === \"\")) {
\$(\"#contact-form-errors\").empty().html(\"";
// line 161
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.required_fields_are_missing"), "html", null, true);
echo "\").removeClass(\"hidden\");
return;
}
if((email !== \"\") && !emailRegex.test(String(email).toLowerCase())) {
\$(\"#contact-form-errors\").empty().html(\"";
// line 166
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.email_not_valid"), "html", null, true);
echo "\").removeClass(\"hidden\");
return;
}
if((phone !== \"\") && !phoneRegex.test(String(phone).toLowerCase())) {
\$(\"#contact-form-errors\").empty().html(\"";
// line 171
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.phone_not_valid"), "html", null, true);
echo "\").removeClass(\"hidden\");
return;
}
\$(\"#contact-form-errors\").empty().addClass(\"hidden\");
\$(\"form#contact-form button\").empty().html(\"<i class='fas fa-paper-plane'></i>";
// line 176
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.sending"), "html", null, true);
echo "\");
document.getElementById(\"contact-form\").submit();
});
}
</script>
";
}
// line 182
echo "
";
// line 183
if ((twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 183, $this->source); })()), "code", [], "any", false, false, false, 183) == "contact")) {
// line 184
echo " <script type=\"text/javascript\">
mapboxgl.accessToken = '";
// line 185
echo twig_escape_filter($this->env, (isset($context["mapbox_key"]) || array_key_exists("mapbox_key", $context) ? $context["mapbox_key"] : (function () { throw new RuntimeError('Variable "mapbox_key" does not exist.', 185, $this->source); })()), "html", null, true);
echo "';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: [3.9129083, 46.065271],
zoom: 13
});
var marker = new mapboxgl.Marker({
color: '#883412'
})
.setLngLat([3.9129083, 46.065271])
.addTo(map);
var nav = new mapboxgl.NavigationControl();
map.addControl(nav, 'top-left');
</script>
";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 509 => 185, 506 => 184, 504 => 183, 501 => 182, 492 => 176, 484 => 171, 476 => 166, 468 => 161, 452 => 147, 450 => 146, 447 => 145, 435 => 138, 423 => 131, 415 => 126, 409 => 122, 407 => 121, 404 => 120, 389 => 108, 381 => 104, 379 => 103, 373 => 101, 363 => 100, 352 => 96, 349 => 95, 346 => 94, 343 => 93, 340 => 92, 337 => 91, 334 => 90, 331 => 89, 328 => 88, 318 => 87, 308 => 83, 303 => 81, 299 => 80, 295 => 79, 289 => 76, 285 => 75, 280 => 73, 276 => 72, 272 => 71, 268 => 69, 262 => 67, 259 => 66, 253 => 64, 250 => 63, 248 => 62, 242 => 60, 232 => 59, 222 => 57, 216 => 55, 214 => 54, 211 => 53, 206 => 50, 204 => 49, 198 => 47, 188 => 46, 178 => 59, 175 => 58, 173 => 46, 167 => 44, 157 => 43, 143 => 38, 137 => 36, 135 => 35, 125 => 34, 114 => 30, 108 => 28, 102 => 26, 99 => 25, 97 => 23, 96 => 22, 95 => 21, 94 => 20, 93 => 19, 91 => 18, 81 => 17, 71 => 6, 68 => 13, 66 => 12, 64 => 11, 62 => 9, 59 => 4, 56 => 2, 54 => 1, 41 => 6,);
}
public function getSourceContext()
{
return new Source("{% if page.fullLayout == true %}
{% set layout = '@SyliusShop/layout-full-width.html.twig' %}
{% else %}
{% set layout = '@SyliusShop/layout.html.twig' %}
{% endif %}
{% extends layout %}
{% set published = (page.publishAt is not null and page.publishAt|date(\"Y-m-d H:i:s\") < \"now\"|date(\"Y-m-d H:i:s\") or page.publishAt is null) %}
{% set mainImage = null %}
{% if page.image %}
{% set mainImage = page.image.path %}
{% endif %}
{% block banner %}
{% if
page.code != \"conditions-d-utilisation\"
and page.code != \"conditions-generales-de-vente\"
and page.code != \"mentions-legales\"
and page.code != \"politique-de-confidentialite\"
and page.template != \"structure\"
%}
{% if ('@SyliusShop/Banner/_banner-' ~ page.code ~ '.html.twig')|template_file_exists %}
{{ render(url('odiseo_sylius_banner_plugin_shop_partial_banner', {'template': '@SyliusShop/Banner/_banner-' ~ page.code ~ '.html.twig'})) }}
{% else %}
{{ render(url('odiseo_sylius_banner_plugin_shop_partial_banner', {'template': '@SyliusShop/Banner/_banner.html.twig'})) }}
{% endif %}
{% endif %}
{% endblock %}
{%- block title -%}
{% if page.title is not empty and published == true %}
{{ page.title }}
{% else %}
{{ parent() }}
{% endif %}
{%- endblock -%}
{% block head %}
{{ parent() }}
{% block stylesheets %}
{{ parent() }}
{% if page.code == \"contact\" or page.template == \"structure\" %}
<script src='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
{% endif %}
{% if page.template == \"prestation\" or page.template == \"structure\" %}
<link href='{{ asset('assets/shop/css/magnific-popup.css') }}' rel='stylesheet' />
{% endif %}
{% endblock %}
{% block metatags %}
{{ parent() }}
{% if published == true %}
{% if page.metaKeywords is not empty %}
<meta name=\"keywords\" content=\"{{ page.metaKeywords }}\"/>
{% endif %}
{% if page.metaDescription is not empty %}
<meta name=\"description\" content=\"{{ page.metaDescription }}\"/>
{% endif %}
<meta property=\"og:site_name\" content=\"Mons Fromage\" />
<meta property=\"og:locale\" content=\"{{ sylius.localeCode }}\" />
<meta property=\"og:title\" content=\"{{ page.title|e('html_attr') }}\" />
<meta property=\"og:url\" content=\"{{ website_url ~ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}\" />
<meta property=\"og:type\" content=\"website\" />
<meta property=\"og:description\" content=\"{{ page.metaDescription|e('html_attr') }}\" />
<meta property=\"og:image\" content=\"{{ website_url ~ '/' ~ mainImage }}\" />
<meta name=\"twitter:card\" content=\"summary\" />
<meta name=\"twitter:title\" content=\"{{ page.title|e('html_attr') }}\" />
<meta name=\"twitter:description\" content=\"{{ page.metaDescription|e('html_attr') }}\" />
<meta name=\"twitter:image\" content=\"{{ website_url ~ '/' ~ mainImage }}\" />
{% endif %}
{% endblock %}
{% endblock %}
{% block content %}
{% if published == true %}
{% if page.template is not null %}
{% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/templates/_' ~ page.template ~ '.html.twig' %}
{% else %}
{% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/' ~ page.code ~ '.html.twig' %}
{% endif %}
{% else %}
{% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig' with {'publishAt': page.publishAt} %}
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% if page.template == \"prestation\" or page.template == \"structure\" %}
<script src=\"{{ asset('assets/shop/js/jquery.magnific-popup.min.js') }}\"></script>
<script type=\"text/javascript\">
\$(document).ready(function (\$) {
\$('.{{ page.template }}-details__galerie-images').magnificPopup({
delegate: 'a',
fixedContentPos: false,
midClick: true,
gallery:{
enabled:true
},
type: 'image'
});
});
</script>
{% endif %}
{% if page.template == \"structure\" %}
<script type=\"text/javascript\">
// Display the map
mapboxgl.accessToken = '{{ mapbox_key }}';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: [{{ page.structureGpsLng }}, {{ page.structureGpsLat }}],
zoom: 13
});
var marker = new mapboxgl.Marker({
color: '#883412'
})
.setLngLat([{{ page.structureGpsLng }}, {{ page.structureGpsLat }}])
.addTo(map);
var nav = new mapboxgl.NavigationControl();
map.addControl(nav, 'top-left');
</script>
{% endif %}
{% if page.code == \"contact\" or page.code == \"fromagers-evenementiels\" or page.code == \"centre-international-mons-formation\" %}
<script src=\"https://www.google.com/recaptcha/api.js\"></script>
<script type=\"text/javascript\">
function onSubmitContactForm(token) {
\$(document).ready(function() {
\$(\"form#contact-form #recaptcha-token\").val(token);
var firstName = \$(\"form#contact-form input#sylius_contact_firstname\").val().trim();
var lastName = \$(\"form#contact-form input#sylius_contact_lastname\").val().trim();
var email = \$(\"form#contact-form input#sylius_contact_email\").val().trim();
var phone = \$(\"form#contact-form input#sylius_contact_phone\").val().trim();
var message = \$(\"form#contact-form #sylius_contact_message\").val().trim();
var emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))\$/;
var phoneRegex = /^(\\D*\\d){8,}\$/;
if((firstName === \"\") || (lastName === \"\") || (email === \"\") || (message === \"\")) {
\$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.required_fields_are_missing'|trans }}\").removeClass(\"hidden\");
return;
}
if((email !== \"\") && !emailRegex.test(String(email).toLowerCase())) {
\$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.email_not_valid'|trans }}\").removeClass(\"hidden\");
return;
}
if((phone !== \"\") && !phoneRegex.test(String(phone).toLowerCase())) {
\$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.phone_not_valid'|trans }}\").removeClass(\"hidden\");
return;
}
\$(\"#contact-form-errors\").empty().addClass(\"hidden\");
\$(\"form#contact-form button\").empty().html(\"<i class='fas fa-paper-plane'></i>{{ 'sylius.contact.sending'|trans }}\");
document.getElementById(\"contact-form\").submit();
});
}
</script>
{% endif %}
{% if page.code == \"contact\" %}
<script type=\"text/javascript\">
mapboxgl.accessToken = '{{ mapbox_key }}';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
center: [3.9129083, 46.065271],
zoom: 13
});
var marker = new mapboxgl.Marker({
color: '#883412'
})
.setLngLat([3.9129083, 46.065271])
.addTo(map);
var nav = new mapboxgl.NavigationControl();
map.addControl(nav, 'top-left');
</script>
{% endif %}
{% endblock %}
", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", "/home/mons/site/www/templates/bundles/BitBagSyliusCmsPlugin/Shop/Page/show.html.twig");
}
}