var/cache/dev/twig/8d/8dbf2bb7b945f079eb5cd51b023370afb4f897c7a4062a69c16c98ca4c60e849.php line 318

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @BitBagSyliusCmsPlugin/Shop/Page/show.html.twig */
  14. class __TwigTemplate_2509da607c98be9540b29fdeb4a7f2d49c210aff6a3f399ecb0bb023bec5afc1 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'banner' => [$this'block_banner'],
  24.             'title' => [$this'block_title'],
  25.             'head' => [$this'block_head'],
  26.             'stylesheets' => [$this'block_stylesheets'],
  27.             'metatags' => [$this'block_metatags'],
  28.             'content' => [$this'block_content'],
  29.             'javascripts' => [$this'block_javascripts'],
  30.         ];
  31.     }
  32.     protected function doGetParent(array $context)
  33.     {
  34.         // line 6
  35.         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);
  36.     }
  37.     protected function doDisplay(array $context, array $blocks = [])
  38.     {
  39.         $macros $this->macros;
  40.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
  42.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
  44.         // line 1
  45.         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"falsefalsefalse1) == true)) {
  46.             // line 2
  47.             $context["layout"] = "@SyliusShop/layout-full-width.html.twig";
  48.         } else {
  49.             // line 4
  50.             $context["layout"] = "@SyliusShop/layout.html.twig";
  51.         }
  52.         // line 9
  53.         $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"falsefalsefalse9)) && (twig_date_format_filter($this->envtwig_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"falsefalsefalse9), "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"falsefalsefalse9)));
  54.         // line 11
  55.         $context["mainImage"] = null;
  56.         // line 12
  57.         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"falsefalsefalse12)) {
  58.             // line 13
  59.             $context["mainImage"] = twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse13), "path", [], "any"falsefalsefalse13);
  60.         }
  61.         // line 6
  62.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  63.         
  64.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  65.         
  66.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  67.     }
  68.     // line 17
  69.     public function block_banner($context, array $blocks = [])
  70.     {
  71.         $macros $this->macros;
  72.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  73.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""banner"));
  74.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  75.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""banner"));
  76.         // line 18
  77.         echo "    ";
  78.         if ((((((twig_get_attribute($this->env$this->source,         // line 19
  79. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'19$this->source); })()), "code", [], "any"falsefalsefalse19) != "conditions-d-utilisation") && (twig_get_attribute($this->env$this->source,         // line 20
  80. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'20$this->source); })()), "code", [], "any"falsefalsefalse20) != "conditions-generales-de-vente")) && (twig_get_attribute($this->env$this->source,         // line 21
  81. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'21$this->source); })()), "code", [], "any"falsefalsefalse21) != "mentions-legales")) && (twig_get_attribute($this->env$this->source,         // line 22
  82. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'22$this->source); })()), "code", [], "any"falsefalsefalse22) != "politique-de-confidentialite")) && (twig_get_attribute($this->env$this->source,         // line 23
  83. (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'23$this->source); })()), "template", [], "any"falsefalsefalse23) != "structure"))) {
  84.             // line 25
  85.             echo "        ";
  86.             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"falsefalsefalse25)) . ".html.twig"))) {
  87.                 // line 26
  88.                 echo "            ";
  89.                 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"falsefalsefalse26)) . ".html.twig")]));
  90.                 echo "
  91.         ";
  92.             } else {
  93.                 // line 28
  94.                 echo "            ";
  95.                 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"]));
  96.                 echo "
  97.         ";
  98.             }
  99.             // line 30
  100.             echo "    ";
  101.         }
  102.         
  103.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  104.         
  105.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  106.     }
  107.     // line 34
  108.     public function block_title($context, array $blocks = [])
  109.     {
  110.         $macros $this->macros;
  111.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  112.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  113.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  114.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  115.         // line 35
  116.         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"falsefalsefalse35)) && ((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'35$this->source); })()) == true))) {
  117.             // line 36
  118.             echo "        ";
  119.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse36), "html"nulltrue);
  120.             echo "
  121.     ";
  122.         } else {
  123.             // line 38
  124.             echo "        ";
  125.             $this->displayParentBlock("title"$context$blocks);
  126.             echo "
  127.     ";
  128.         }
  129.         
  130.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  131.         
  132.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  133.     }
  134.     // line 43
  135.     public function block_head($context, array $blocks = [])
  136.     {
  137.         $macros $this->macros;
  138.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  139.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""head"));
  140.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  141.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""head"));
  142.         // line 44
  143.         echo "    ";
  144.         $this->displayParentBlock("head"$context$blocks);
  145.         echo "
  146.     ";
  147.         // line 46
  148.         $this->displayBlock('stylesheets'$context$blocks);
  149.         // line 58
  150.         echo "
  151.     ";
  152.         // line 59
  153.         $this->displayBlock('metatags'$context$blocks);
  154.         
  155.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  156.         
  157.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  158.     }
  159.     // line 46
  160.     public function block_stylesheets($context, array $blocks = [])
  161.     {
  162.         $macros $this->macros;
  163.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  164.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  165.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  166.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  167.         // line 47
  168.         echo "        ";
  169.         $this->displayParentBlock("stylesheets"$context$blocks);
  170.         echo "
  171.         ";
  172.         // line 49
  173.         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"falsefalsefalse49) == "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"falsefalsefalse49) == "structure"))) {
  174.             // line 50
  175.             echo "            <script src='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js'></script>
  176.             <link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
  177.         ";
  178.         }
  179.         // line 53
  180.         echo "
  181.         ";
  182.         // line 54
  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.'54$this->source); })()), "template", [], "any"falsefalsefalse54) == "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"falsefalsefalse54) == "structure"))) {
  184.             // line 55
  185.             echo "            <link href='";
  186.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/shop/css/magnific-popup.css"), "html"nulltrue);
  187.             echo "' rel='stylesheet' />
  188.         ";
  189.         }
  190.         // line 57
  191.         echo "    ";
  192.         
  193.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  194.         
  195.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  196.     }
  197.     // line 59
  198.     public function block_metatags($context, array $blocks = [])
  199.     {
  200.         $macros $this->macros;
  201.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  202.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metatags"));
  203.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  204.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metatags"));
  205.         // line 60
  206.         echo "        ";
  207.         $this->displayParentBlock("metatags"$context$blocks);
  208.         echo "
  209.         ";
  210.         // line 62
  211.         if (((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'62$this->source); })()) == true)) {
  212.             // line 63
  213.             echo "            ";
  214.             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"falsefalsefalse63))) {
  215.                 // line 64
  216.                 echo "                <meta name=\"keywords\" content=\"";
  217.                 echo twig_escape_filter($this->envtwig_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"falsefalsefalse64), "html"nulltrue);
  218.                 echo "\"/>
  219.             ";
  220.             }
  221.             // line 66
  222.             echo "            ";
  223.             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"falsefalsefalse66))) {
  224.                 // line 67
  225.                 echo "                <meta name=\"description\" content=\"";
  226.                 echo twig_escape_filter($this->envtwig_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"falsefalsefalse67), "html"nulltrue);
  227.                 echo "\"/>
  228.             ";
  229.             }
  230.             // line 69
  231.             echo "
  232.             <meta property=\"og:site_name\" content=\"Mons Fromage\" />
  233.             <meta property=\"og:locale\" content=\"";
  234.             // line 71
  235.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse71), "html"nulltrue);
  236.             echo "\" />
  237.             <meta property=\"og:title\" content=\"";
  238.             // line 72
  239.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse72), "html_attr");
  240.             echo "\" />
  241.             <meta property=\"og:url\" content=\"";
  242.             // line 73
  243.             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->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse73), "attributes", [], "any"falsefalsefalse73), "get", [=> "_route"], "method"falsefalsefalse73), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse73), "attributes", [], "any"falsefalsefalse73), "get", [=> "_route_params"], "method"falsefalsefalse73))), "html"nulltrue);
  244.             echo "\" />
  245.             <meta property=\"og:type\" content=\"website\" />
  246.             <meta property=\"og:description\" content=\"";
  247.             // line 75
  248.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse75), "html_attr");
  249.             echo "\" />
  250.             <meta property=\"og:image\" content=\"";
  251.             // line 76
  252.             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"nulltrue);
  253.             echo "\" />
  254.             <meta name=\"twitter:card\" content=\"summary\" />
  255.             <meta name=\"twitter:title\" content=\"";
  256.             // line 79
  257.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse79), "html_attr");
  258.             echo "\" />
  259.             <meta name=\"twitter:description\" content=\"";
  260.             // line 80
  261.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse80), "html_attr");
  262.             echo "\" />
  263.             <meta name=\"twitter:image\" content=\"";
  264.             // line 81
  265.             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"nulltrue);
  266.             echo "\" />
  267.         ";
  268.         }
  269.         // line 83
  270.         echo "    ";
  271.         
  272.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  273.         
  274.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  275.     }
  276.     // line 87
  277.     public function block_content($context, array $blocks = [])
  278.     {
  279.         $macros $this->macros;
  280.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  281.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  282.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  283.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  284.         // line 88
  285.         echo "    ";
  286.         if (((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'88$this->source); })()) == true)) {
  287.             // line 89
  288.             echo "        ";
  289.             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"falsefalsefalse89))) {
  290.                 // line 90
  291.                 echo "            ";
  292.                 $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"falsefalsefalse90)) . ".html.twig"), "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"90)->display($context);
  293.                 // line 91
  294.                 echo "        ";
  295.             } else {
  296.                 // line 92
  297.                 echo "            ";
  298.                 $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"falsefalsefalse92)) . ".html.twig"), "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"92)->display($context);
  299.                 // line 93
  300.                 echo "        ";
  301.             }
  302.             // line 94
  303.             echo "    ";
  304.         } else {
  305.             // line 95
  306.             echo "        ";
  307.             $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"falsefalsefalse95)]));
  308.             // line 96
  309.             echo "    ";
  310.         }
  311.         
  312.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  313.         
  314.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  315.     }
  316.     // line 100
  317.     public function block_javascripts($context, array $blocks = [])
  318.     {
  319.         $macros $this->macros;
  320.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  321.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  322.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  323.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  324.         // line 101
  325.         echo "    ";
  326.         $this->displayParentBlock("javascripts"$context$blocks);
  327.         echo "
  328.     ";
  329.         // line 103
  330.         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"falsefalsefalse103) == "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"falsefalsefalse103) == "structure"))) {
  331.             // line 104
  332.             echo "        <script src=\"";
  333.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/shop/js/jquery.magnific-popup.min.js"), "html"nulltrue);
  334.             echo "\"></script>
  335.         <script type=\"text/javascript\">
  336.             \$(document).ready(function (\$) {
  337.                 \$('.";
  338.             // line 108
  339.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse108), "html"nulltrue);
  340.             echo "-details__galerie-images').magnificPopup({
  341.                     delegate: 'a',
  342.                     fixedContentPos: false,
  343.                     midClick: true,
  344.                     gallery:{
  345.                         enabled:true
  346.                     },
  347.                     type: 'image'
  348.                 });
  349.             });
  350.         </script>
  351.     ";
  352.         }
  353.         // line 120
  354.         echo "
  355.     ";
  356.         // line 121
  357.         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"falsefalsefalse121) == "structure")) {
  358.             // line 122
  359.             echo "        <script type=\"text/javascript\">
  360.             // Display the map
  361.             mapboxgl.accessToken = '";
  362.             // line 126
  363.             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"nulltrue);
  364.             echo "';
  365.             var map = new mapboxgl.Map({
  366.                 container: 'map',
  367.                 style: 'mapbox://styles/mapbox/light-v10',
  368.                 center: [";
  369.             // line 131
  370.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse131), "html"nulltrue);
  371.             echo ", ";
  372.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse131), "html"nulltrue);
  373.             echo "],
  374.                 zoom: 13
  375.             });
  376.             var marker = new mapboxgl.Marker({
  377.                 color: '#883412'
  378.             })
  379.                 .setLngLat([";
  380.             // line 138
  381.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse138), "html"nulltrue);
  382.             echo ", ";
  383.             echo twig_escape_filter($this->envtwig_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"falsefalsefalse138), "html"nulltrue);
  384.             echo "])
  385.                 .addTo(map);
  386.             var nav = new mapboxgl.NavigationControl();
  387.             map.addControl(nav, 'top-left');
  388.         </script>
  389.     ";
  390.         }
  391.         // line 145
  392.         echo "
  393.     ";
  394.         // line 146
  395.         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"falsefalsefalse146) == "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"falsefalsefalse146) == "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"falsefalsefalse146) == "centre-international-mons-formation"))) {
  396.             // line 147
  397.             echo "        <script src=\"https://www.google.com/recaptcha/api.js\"></script>
  398.         <script type=\"text/javascript\">
  399.             function onSubmitContactForm(token) {
  400.                 \$(document).ready(function() {
  401.                     \$(\"form#contact-form #recaptcha-token\").val(token);
  402.                     var firstName = \$(\"form#contact-form input#sylius_contact_firstname\").val().trim();
  403.                     var lastName = \$(\"form#contact-form input#sylius_contact_lastname\").val().trim();
  404.                     var email = \$(\"form#contact-form input#sylius_contact_email\").val().trim();
  405.                     var phone = \$(\"form#contact-form input#sylius_contact_phone\").val().trim();
  406.                     var message = \$(\"form#contact-form #sylius_contact_message\").val().trim();
  407.                     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,}))\$/;
  408.                     var phoneRegex = /^(\\D*\\d){8,}\$/;
  409.                     if((firstName === \"\") || (lastName === \"\") || (email === \"\") || (message === \"\")) {
  410.                         \$(\"#contact-form-errors\").empty().html(\"";
  411.             // line 161
  412.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.required_fields_are_missing"), "html"nulltrue);
  413.             echo "\").removeClass(\"hidden\");
  414.                         return;
  415.                     }
  416.                     if((email !== \"\") && !emailRegex.test(String(email).toLowerCase())) {
  417.                         \$(\"#contact-form-errors\").empty().html(\"";
  418.             // line 166
  419.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.email_not_valid"), "html"nulltrue);
  420.             echo "\").removeClass(\"hidden\");
  421.                         return;
  422.                     }
  423.                     if((phone !== \"\") && !phoneRegex.test(String(phone).toLowerCase())) {
  424.                         \$(\"#contact-form-errors\").empty().html(\"";
  425.             // line 171
  426.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.phone_not_valid"), "html"nulltrue);
  427.             echo "\").removeClass(\"hidden\");
  428.                         return;
  429.                     }
  430.                     \$(\"#contact-form-errors\").empty().addClass(\"hidden\");
  431.                     \$(\"form#contact-form button\").empty().html(\"<i class='fas fa-paper-plane'></i>";
  432.             // line 176
  433.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.contact.sending"), "html"nulltrue);
  434.             echo "\");
  435.                     document.getElementById(\"contact-form\").submit();
  436.                 });
  437.             }
  438.         </script>
  439.     ";
  440.         }
  441.         // line 182
  442.         echo "
  443.     ";
  444.         // line 183
  445.         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"falsefalsefalse183) == "contact")) {
  446.             // line 184
  447.             echo "        <script type=\"text/javascript\">
  448.             mapboxgl.accessToken = '";
  449.             // line 185
  450.             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"nulltrue);
  451.             echo "';
  452.             var map = new mapboxgl.Map({
  453.                 container: 'map',
  454.                 style: 'mapbox://styles/mapbox/light-v10',
  455.                 center: [3.9129083, 46.065271],
  456.                 zoom: 13
  457.             });
  458.             var marker = new mapboxgl.Marker({
  459.                 color: '#883412'
  460.             })
  461.                 .setLngLat([3.9129083, 46.065271])
  462.                 .addTo(map);
  463.             var nav = new mapboxgl.NavigationControl();
  464.             map.addControl(nav, 'top-left');
  465.         </script>
  466.     ";
  467.         }
  468.         
  469.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  470.         
  471.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  472.     }
  473.     public function getTemplateName()
  474.     {
  475.         return "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig";
  476.     }
  477.     public function isTraitable()
  478.     {
  479.         return false;
  480.     }
  481.     public function getDebugInfo()
  482.     {
  483.         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,);
  484.     }
  485.     public function getSourceContext()
  486.     {
  487.         return new Source("{% if page.fullLayout == true %}
  488.     {% set layout = '@SyliusShop/layout-full-width.html.twig' %}
  489. {% else %}
  490.     {% set layout = '@SyliusShop/layout.html.twig' %}
  491. {% endif %}
  492. {% extends layout %}
  493. {% 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) %}
  494. {% set mainImage = null %}
  495. {% if page.image %}
  496.     {% set mainImage = page.image.path %}
  497. {% endif %}
  498. {% block banner %}
  499.     {% if
  500.         page.code != \"conditions-d-utilisation\"
  501.         and page.code != \"conditions-generales-de-vente\"
  502.         and page.code != \"mentions-legales\"
  503.         and page.code != \"politique-de-confidentialite\"
  504.         and page.template != \"structure\"
  505.     %}
  506.         {% if ('@SyliusShop/Banner/_banner-' ~ page.code ~ '.html.twig')|template_file_exists %}
  507.             {{ render(url('odiseo_sylius_banner_plugin_shop_partial_banner', {'template': '@SyliusShop/Banner/_banner-' ~ page.code ~ '.html.twig'})) }}
  508.         {% else %}
  509.             {{ render(url('odiseo_sylius_banner_plugin_shop_partial_banner', {'template': '@SyliusShop/Banner/_banner.html.twig'})) }}
  510.         {% endif %}
  511.     {% endif %}
  512. {% endblock %}
  513. {%- block title -%}
  514.     {% if page.title is not empty and published == true  %}
  515.         {{ page.title }}
  516.     {% else %}
  517.         {{ parent() }}
  518.     {% endif %}
  519. {%- endblock -%}
  520. {% block head %}
  521.     {{ parent() }}
  522.     {% block stylesheets %}
  523.         {{ parent() }}
  524.         {% if page.code == \"contact\" or page.template == \"structure\" %}
  525.             <script src='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js'></script>
  526.             <link href='https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css' rel='stylesheet' />
  527.         {% endif %}
  528.         {% if page.template == \"prestation\" or page.template == \"structure\" %}
  529.             <link href='{{ asset('assets/shop/css/magnific-popup.css') }}' rel='stylesheet' />
  530.         {% endif %}
  531.     {% endblock %}
  532.     {% block metatags %}
  533.         {{ parent() }}
  534.         {% if published == true %}
  535.             {% if page.metaKeywords is not empty %}
  536.                 <meta name=\"keywords\" content=\"{{ page.metaKeywords }}\"/>
  537.             {% endif %}
  538.             {% if page.metaDescription is not empty %}
  539.                 <meta name=\"description\" content=\"{{ page.metaDescription }}\"/>
  540.             {% endif %}
  541.             <meta property=\"og:site_name\" content=\"Mons Fromage\" />
  542.             <meta property=\"og:locale\" content=\"{{ sylius.localeCode }}\" />
  543.             <meta property=\"og:title\" content=\"{{ page.title|e('html_attr') }}\" />
  544.             <meta property=\"og:url\" content=\"{{ website_url ~ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}\" />
  545.             <meta property=\"og:type\" content=\"website\" />
  546.             <meta property=\"og:description\" content=\"{{ page.metaDescription|e('html_attr') }}\" />
  547.             <meta property=\"og:image\" content=\"{{ website_url ~ '/' ~ mainImage }}\" />
  548.             <meta name=\"twitter:card\" content=\"summary\" />
  549.             <meta name=\"twitter:title\" content=\"{{ page.title|e('html_attr') }}\" />
  550.             <meta name=\"twitter:description\" content=\"{{ page.metaDescription|e('html_attr') }}\" />
  551.             <meta name=\"twitter:image\" content=\"{{ website_url ~ '/' ~ mainImage }}\" />
  552.         {% endif %}
  553.     {% endblock %}
  554. {% endblock %}
  555. {% block content %}
  556.     {% if published == true %}
  557.         {% if page.template is not null %}
  558.             {% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/templates/_' ~ page.template ~ '.html.twig' %}
  559.         {% else %}
  560.             {% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/' ~ page.code ~ '.html.twig' %}
  561.         {% endif %}
  562.     {% else %}
  563.         {% include 'bundles/BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig' with {'publishAt': page.publishAt} %}
  564.     {% endif %}
  565. {% endblock %}
  566. {% block javascripts %}
  567.     {{ parent() }}
  568.     {% if page.template == \"prestation\" or page.template == \"structure\" %}
  569.         <script src=\"{{ asset('assets/shop/js/jquery.magnific-popup.min.js') }}\"></script>
  570.         <script type=\"text/javascript\">
  571.             \$(document).ready(function (\$) {
  572.                 \$('.{{ page.template }}-details__galerie-images').magnificPopup({
  573.                     delegate: 'a',
  574.                     fixedContentPos: false,
  575.                     midClick: true,
  576.                     gallery:{
  577.                         enabled:true
  578.                     },
  579.                     type: 'image'
  580.                 });
  581.             });
  582.         </script>
  583.     {% endif %}
  584.     {% if page.template == \"structure\" %}
  585.         <script type=\"text/javascript\">
  586.             // Display the map
  587.             mapboxgl.accessToken = '{{ mapbox_key }}';
  588.             var map = new mapboxgl.Map({
  589.                 container: 'map',
  590.                 style: 'mapbox://styles/mapbox/light-v10',
  591.                 center: [{{ page.structureGpsLng }}, {{ page.structureGpsLat }}],
  592.                 zoom: 13
  593.             });
  594.             var marker = new mapboxgl.Marker({
  595.                 color: '#883412'
  596.             })
  597.                 .setLngLat([{{ page.structureGpsLng }}, {{ page.structureGpsLat }}])
  598.                 .addTo(map);
  599.             var nav = new mapboxgl.NavigationControl();
  600.             map.addControl(nav, 'top-left');
  601.         </script>
  602.     {% endif %}
  603.     {% if page.code == \"contact\" or page.code == \"fromagers-evenementiels\" or page.code == \"centre-international-mons-formation\" %}
  604.         <script src=\"https://www.google.com/recaptcha/api.js\"></script>
  605.         <script type=\"text/javascript\">
  606.             function onSubmitContactForm(token) {
  607.                 \$(document).ready(function() {
  608.                     \$(\"form#contact-form #recaptcha-token\").val(token);
  609.                     var firstName = \$(\"form#contact-form input#sylius_contact_firstname\").val().trim();
  610.                     var lastName = \$(\"form#contact-form input#sylius_contact_lastname\").val().trim();
  611.                     var email = \$(\"form#contact-form input#sylius_contact_email\").val().trim();
  612.                     var phone = \$(\"form#contact-form input#sylius_contact_phone\").val().trim();
  613.                     var message = \$(\"form#contact-form #sylius_contact_message\").val().trim();
  614.                     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,}))\$/;
  615.                     var phoneRegex = /^(\\D*\\d){8,}\$/;
  616.                     if((firstName === \"\") || (lastName === \"\") || (email === \"\") || (message === \"\")) {
  617.                         \$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.required_fields_are_missing'|trans }}\").removeClass(\"hidden\");
  618.                         return;
  619.                     }
  620.                     if((email !== \"\") && !emailRegex.test(String(email).toLowerCase())) {
  621.                         \$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.email_not_valid'|trans }}\").removeClass(\"hidden\");
  622.                         return;
  623.                     }
  624.                     if((phone !== \"\") && !phoneRegex.test(String(phone).toLowerCase())) {
  625.                         \$(\"#contact-form-errors\").empty().html(\"{{ 'sylius.contact.phone_not_valid'|trans }}\").removeClass(\"hidden\");
  626.                         return;
  627.                     }
  628.                     \$(\"#contact-form-errors\").empty().addClass(\"hidden\");
  629.                     \$(\"form#contact-form button\").empty().html(\"<i class='fas fa-paper-plane'></i>{{ 'sylius.contact.sending'|trans }}\");
  630.                     document.getElementById(\"contact-form\").submit();
  631.                 });
  632.             }
  633.         </script>
  634.     {% endif %}
  635.     {% if page.code == \"contact\" %}
  636.         <script type=\"text/javascript\">
  637.             mapboxgl.accessToken = '{{ mapbox_key }}';
  638.             var map = new mapboxgl.Map({
  639.                 container: 'map',
  640.                 style: 'mapbox://styles/mapbox/light-v10',
  641.                 center: [3.9129083, 46.065271],
  642.                 zoom: 13
  643.             });
  644.             var marker = new mapboxgl.Marker({
  645.                 color: '#883412'
  646.             })
  647.                 .setLngLat([3.9129083, 46.065271])
  648.                 .addTo(map);
  649.             var nav = new mapboxgl.NavigationControl();
  650.             map.addControl(nav, 'top-left');
  651.         </script>
  652.     {% endif %}
  653. {% endblock %}
  654. ""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig""/home/mons/site/www/templates/bundles/BitBagSyliusCmsPlugin/Shop/Page/show.html.twig");
  655.     }
  656. }