<?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_2ea47e7f65fd2ffbbca6503f50425ff5 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'metatags' => [$this, 'block_metatags'],
'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_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 6
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.', 6, $this->source); })()), "title", [], "any", false, false, false, 6)) && ((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 6, $this->source); })()) == true))) {
// line 7
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.', 7, $this->source); })()), "title", [], "any", false, false, false, 7), "html", null, true);
echo "
";
} else {
// line 9
echo " ";
$this->displayParentBlock("title", $context, $blocks);
echo "
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 13
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 14
echo " ";
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 14, $this->source); })()) == true)) {
// line 15
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.', 15, $this->source); })()), "metaKeywords", [], "any", false, false, false, 15))) {
// line 16
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.', 16, $this->source); })()), "metaKeywords", [], "any", false, false, false, 16), "html", null, true);
echo "\"/>
";
}
// line 18
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.', 18, $this->source); })()), "metaDescription", [], "any", false, false, false, 18))) {
// line 19
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.', 19, $this->source); })()), "metaDescription", [], "any", false, false, false, 19), "html", null, true);
echo "\"/>
";
}
// line 21
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 23
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 24
echo " ";
if (((isset($context["published"]) || array_key_exists("published", $context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.', 24, $this->source); })()) == true)) {
// line 25
echo " <div class=\"ui breadcrumb\">
<a href=\"";
// line 26
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_homepage");
echo "\" class=\"section\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.home"), "html", null, true);
echo "</a>
<div class=\"divider\"> /</div>
<div class=\"active section\">";
// line 28
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.', 28, $this->source); })()), "breadcrumb", [], "any", false, false, false, 28), "html", null, true);
echo "</div>
</div>
<div class=\"ui segment\">
<h1 class=\"ui dividing header bitbag-page-name\">";
// line 31
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.', 31, $this->source); })()), "name", [], "any", false, false, false, 31), "html", null, true);
echo "</h1>
<div class=\"ui grid center aligned\">
<div class=\"wide column\">
";
// line 35
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.', 35, $this->source); })()), "image", [], "any", false, false, false, 35)) {
// line 36
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.', 36, $this->source); })()), "image", [], "any", false, false, false, 36), "path", [], "any", false, false, false, 36), "html", null, true);
echo "\" alt=\"\">
";
}
// line 38
echo " </div>
</div>
<div class=\"ui hidden divider\"></div>
<div class=\"bitbag-page-content\">";
// line 43
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.', 43, $this->source); })()));
echo "</div>
<div class=\"ui dividing header\"></div>
<div class=\"bitbag-page-sections\">
";
// line 46
$this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 46)->display($context);
// line 47
echo " </div>
</div>
";
// line 49
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.', 49, $this->source); })()), "products", [], "any", false, false, false, 49)) > 0)) {
// line 50
echo " <h2>
";
// line 51
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\" data-js-products-carousel-id=\"related-products\">
";
// line 54
$this->loadTemplate("@SyliusShop/Product/_horizontalList.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 54)->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.', 54, $this->source); })()), "products", [], "any", false, false, false, 54)]));
// line 55
echo " </div>
";
}
// line 57
echo " ";
} else {
// line 58
echo " ";
$this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig", "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig", 58)->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.', 58, $this->source); })()), "publishAt", [], "any", false, false, false, 58)]));
// line 59
echo " ";
}
// line 60
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 ( 226 => 60, 223 => 59, 220 => 58, 217 => 57, 213 => 55, 211 => 54, 205 => 51, 202 => 50, 200 => 49, 196 => 47, 194 => 46, 188 => 43, 181 => 38, 175 => 36, 173 => 35, 166 => 31, 160 => 28, 153 => 26, 150 => 25, 147 => 24, 137 => 23, 126 => 21, 120 => 19, 117 => 18, 111 => 16, 108 => 15, 105 => 14, 95 => 13, 81 => 9, 75 => 7, 73 => 6, 63 => 5, 52 => 1, 50 => 3, 37 => 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 title -%}
{% if page.title is not empty and published == true %}
{{ page.title }}
{% else %}
{{ parent() }}
{% endif %}
{%- 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 content %}
{% if published == true %}
<div class=\"ui breadcrumb\">
<a href=\"{{ path('sylius_shop_homepage') }}\" class=\"section\">{{ 'sylius.ui.home'|trans }}</a>
<div class=\"divider\"> /</div>
<div class=\"active section\">{{ page.breadcrumb }}</div>
</div>
<div class=\"ui segment\">
<h1 class=\"ui dividing header bitbag-page-name\">{{ page.name }}</h1>
<div class=\"ui grid center aligned\">
<div class=\"wide column\">
{% if page.image %}
<img class=\"page-image ui fluid image\" src=\"{{ page.image.path }}\" alt=\"\">
{% endif %}
</div>
</div>
<div class=\"ui hidden divider\"></div>
<div class=\"bitbag-page-content\">{{ bitbag_cms_render_content(page) }}</div>
<div class=\"ui dividing header\"></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\" data-js-products-carousel-id=\"related-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", "/srv/open_marketplace/templates/bundles/BitBagSyliusCmsPlugin/Shop/Page/show.html.twig");
}
}