<?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_18216f8b8b72f0a1de8e4efeeaec8c95 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'title' => [$this, 'block_title'],
'metatags' => [$this, 'block_metatags'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@SyliusShop/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
// line 3
$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.', 3, $this->source); })()), "publishAt", [], "any", false, false, false, 3)) && (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.', 3, $this->source); })()), "publishAt", [], "any", false, false, false, 3), "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.', 3, $this->source); })()), "publishAt", [], "any", false, false, false, 3)));
// line 1
$this->parent = $this->loadTemplate("@SyliusShop/layout.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 6
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
";
// line 7
echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("shop-cms-page", null, "bootstrapTheme");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 10
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 11
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
";
// line 12
echo $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("shop-cms-page", null, "bootstrapTheme");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 15
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 16
echo " ";
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("dedi_sylius_seo_plugin.title", ["resource" => (($context["product"]) ?? (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.', 16, $this->source); })()), "channel", [], "any", false, false, false, 16))), "title" => ((( !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.', 16, $this->source); })()), "title", [], "any", false, false, false, 16)) && ((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 16, $this->source); })()) == true))) ? (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.', 16, $this->source); })()), "title", [], "any", false, false, false, 16)) : (null))]);
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
public function block_metatags($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metatags"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metatags"));
// line 20
echo " ";
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 20, $this->source); })()) == true)) {
// line 21
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.', 21, $this->source); })()), "metaKeywords", [], "any", false, false, false, 21))) {
// line 22
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.', 22, $this->source); })()), "metaKeywords", [], "any", false, false, false, 22), "html", null, true);
echo "\"/>
";
}
// line 24
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.', 24, $this->source); })()), "metaDescription", [], "any", false, false, false, 24))) {
// line 25
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.', 25, $this->source); })()), "metaDescription", [], "any", false, false, false, 25), "html", null, true);
echo "\"/>
";
}
// line 27
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 30
public function block_breadcrumb($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 31
echo " <nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a class=\"breadcrumb-link\" href=\"";
// line 33
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_homepage");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.home"), "html", null, true);
echo "</a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">";
// line 34
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.', 34, $this->source); })()), "breadcrumb", [], "any", false, false, false, 34), "html", null, true);
echo "</li>
</ol>
</nav>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 39
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 40
echo " ";
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 40, $this->source); })()) == true)) {
// line 41
echo " <div class=\"page my-7\">
<h1 class=\"bitbag-page-name\">";
// line 42
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.', 42, $this->source); })()), "name", [], "any", false, false, false, 42), "html", null, true);
echo "</h1>
";
// line 44
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.', 44, $this->source); })()), "image", [], "any", false, false, false, 44)) {
// line 45
echo " <img class=\"page-image ui fluid image\" src=\"";
echo twig_escape_filter($this->env, 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.', 45, $this->source); })()), "image", [], "any", false, false, false, 45), "path", [], "any", false, false, false, 45), "html", null, true);
echo "\" alt=\"";
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.', 45, $this->source); })()), "name", [], "any", false, false, false, 45), "html", null, true);
echo "\">
";
}
// line 47
echo "
<div class=\"bitbag-page-content\">";
// line 48
echo $this->env->getRuntime('BitBag\SyliusCmsPlugin\Twig\Runtime\RenderContentRuntime')->renderContent((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 48, $this->source); })()));
echo "</div>
";
// line 53
echo " </div>
";
// line 54
if ((twig_length_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.', 54, $this->source); })()), "products", [], "any", false, false, false, 54)) > 0)) {
// line 55
echo " <h2>
";
// line 56
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("bitbag_sylius_cms_plugin.ui.page_related_products"), "html", null, true);
echo "
</h2>
<div class=\"bitbag-page-products\">
";
// line 59
$this->loadTemplate("@SyliusShop/Product/_horizontalList.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 59)->display(twig_array_merge($context, ["products" => 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.', 59, $this->source); })()), "products", [], "any", false, false, false, 59)]));
// line 60
echo " </div>
";
}
// line 62
echo " ";
} else {
// line 63
echo " ";
$this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 63)->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.', 63, $this->source); })()), "publishAt", [], "any", false, false, false, 63)]));
// line 64
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 284 => 64, 281 => 63, 278 => 62, 274 => 60, 272 => 59, 266 => 56, 263 => 55, 261 => 54, 258 => 53, 253 => 48, 250 => 47, 242 => 45, 240 => 44, 235 => 42, 232 => 41, 229 => 40, 219 => 39, 205 => 34, 199 => 33, 195 => 31, 185 => 30, 174 => 27, 168 => 25, 165 => 24, 159 => 22, 156 => 21, 153 => 20, 143 => 19, 130 => 16, 120 => 15, 108 => 12, 103 => 11, 93 => 10, 81 => 7, 76 => 6, 66 => 5, 55 => 1, 53 => 3, 40 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@SyliusShop/layout.html.twig' %}
{% 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) %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('shop-cms-page', null, 'bootstrapTheme') }}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('shop-cms-page', null, 'bootstrapTheme') }}
{% endblock %}
{% block title %}
{{ sylius_template_event('dedi_sylius_seo_plugin.title', { resource: product ?? sylius.channel, title: page.title is not empty and published == true ? page.title : null }) }}
{% endblock %}
{% block metatags %}
{% 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 %}
{% endif %}
{% endblock %}
{% block breadcrumb %}
<nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a class=\"breadcrumb-link\" href=\"{{ path('sylius_shop_homepage') }}\">{{ 'sylius.ui.home'|trans }}</a></li>
<li class=\"breadcrumb-item active\" aria-current=\"page\">{{ page.breadcrumb }}</li>
</ol>
</nav>
{% endblock %}
{% block content %}
{% if published == true %}
<div class=\"page my-7\">
<h1 class=\"bitbag-page-name\">{{ page.name }}</h1>
{% if page.image %}
<img class=\"page-image ui fluid image\" src=\"{{ page.image.path }}\" alt=\"{{ page.name }}\">
{% endif %}
<div class=\"bitbag-page-content\">{{ bitbag_cms_render_content(page) }}</div>
{#<div class=\"bitbag-page-sections\">
{% include '@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
</div>#}
</div>
{% if page.products|length > 0 %}
<h2>
{{ 'bitbag_sylius_cms_plugin.ui.page_related_products'|trans }}
</h2>
<div class=\"bitbag-page-products\">
{% include '@SyliusShop/Product/_horizontalList.html.twig' with {'products': page.products} %}
</div>
{% endif %}
{% else %}
{% include '@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig' with {'publishAt': page.publishAt} %}
{% endif %}
{% endblock %}
", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", "/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/BitBagSyliusCmsPlugin/views/Shop/Page/show.html.twig");
}
}