<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* articles/newsletters.html.twig */
class __TwigTemplate_24aff504ae7d2032530d8ee79f82ed72fba929af3e000f2016bf65d6a7b03afa extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
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", "articles/newsletters.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "articles/newsletters.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "articles/newsletters.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
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 4
yield "\t";
$context["name"] = "";
// line 5
yield "\t";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 5), "attributes", [], "any", false, true, false, 5), "get", ["structure"], "method", false, true, false, 5), "structure", [], "any", false, true, false, 5), "name", [], "any", true, true, false, 5) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 5, $this->source); })()), "request", [], "any", false, false, false, 5), "attributes", [], "any", false, false, false, 5), "get", ["structure"], "method", false, false, false, 5), "structure", [], "any", false, false, false, 5), "name", [], "any", false, false, false, 5)))) {
// line 6
yield "\t\t";
$context["name"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 6, $this->source); })()), "request", [], "any", false, false, false, 6), "attributes", [], "any", false, false, false, 6), "get", ["structure"], "method", false, false, false, 6), "structure", [], "any", false, false, false, 6), "name", [], "any", false, false, false, 6);
// line 7
yield "\t";
}
// line 8
yield "\t";
$context["values"] = ["Actualités", "Newsletters"];
// line 9
yield "\t";
yield from $this->loadTemplate("articles-blocks/breadcrumb.html.twig", "articles/newsletters.html.twig", 9)->unwrap()->yield(CoreExtension::merge($context, ["titles" => (isset($context["values"]) || array_key_exists("values", $context) ? $context["values"] : (function () { throw new RuntimeError('Variable "values" does not exist.', 9, $this->source); })())]));
// line 10
yield "\t<section class=\"single-article-container\">
\t\t<article>
\t\t\t<div class=\"mlr-1em\">
\t\t\t\t";
// line 13
yield from $this->loadTemplate("articles-blocks/header.html.twig", "articles/newsletters.html.twig", 13)->unwrap()->yield($context);
// line 14
yield "\t\t\t\t";
// line 15
yield "\t\t\t\t";
yield from $this->loadTemplate("articles/blocks/article-under-header.html.twig", "articles/newsletters.html.twig", 15)->unwrap()->yield($context);
// line 16
yield "\t\t\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["extension"] ?? null), "excerpt", [], "any", false, true, false, 16), "categories", [], "any", true, true, false, 16) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["extension"]) || array_key_exists("extension", $context) ? $context["extension"] : (function () { throw new RuntimeError('Variable "extension" does not exist.', 16, $this->source); })()), "excerpt", [], "any", false, false, false, 16), "categories", [], "any", false, false, false, 16)))) {
// line 17
yield "\t\t\t\t\t";
$context["categories"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["extension"]) || array_key_exists("extension", $context) ? $context["extension"] : (function () { throw new RuntimeError('Variable "extension" does not exist.', 17, $this->source); })()), "excerpt", [], "any", false, false, false, 17), "categories", [], "any", false, false, false, 17);
// line 18
yield "\t\t\t\t\t";
yield from $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig", "articles/newsletters.html.twig", 18)->unwrap()->yield($context);
// line 19
yield "\t\t\t\t";
}
// line 20
yield "\t\t\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "chapo", [], "any", true, true, false, 20) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 20, $this->source); })()), "chapo", [], "any", false, false, false, 20)))) {
// line 21
yield "\t\t\t\t\t<div class=\"fw500 lh28 fs20 text cgrey mt-40px\">";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 21, $this->source); })()), "chapo", [], "any", false, false, false, 21);
yield "</div>
\t\t\t\t";
}
// line 23
yield "\t\t\t</div>
\t\t\t";
// line 24
if (((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "main_content", [], "any", true, true, false, 24) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 24, $this->source); })()), "main_content", [], "any", false, false, false, 24))) && (1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 24, $this->source); })()), "main_content", [], "any", false, false, false, 24)), 0)))) {
// line 25
yield "\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 25, $this->source); })()), "main_content", [], "any", false, false, false, 25));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["data"]) {
// line 26
yield "\t\t\t\t\t";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 26), "sub_content"))) {
// line 27
yield "\t\t\t\t\t\t";
yield from $this->loadTemplate("articles-blocks/articles-content.html.twig", "articles/newsletters.html.twig", 27)->unwrap()->yield($context);
// line 28
yield "\t\t\t\t\t";
}
// line 29
yield "\t\t\t\t\t";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 29), "linked_with"))) {
// line 30
yield "\t\t\t\t\t\t";
yield from $this->loadTemplate("articles-blocks/linked-with.html.twig", "articles/newsletters.html.twig", 30)->unwrap()->yield($context);
// line 31
yield "\t\t\t\t\t";
}
// line 32
yield "\t\t\t\t\t";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 32), "see_more"))) {
// line 33
yield "\t\t\t\t\t\t";
yield from $this->loadTemplate("articles-blocks/see-more.html.twig", "articles/newsletters.html.twig", 33)->unwrap()->yield($context);
// line 34
yield "\t\t\t\t\t";
}
// line 35
yield "\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['data'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
yield "\t\t\t";
}
// line 37
yield "\t\t</article>
\t</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "articles/newsletters.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 187 => 37, 184 => 36, 170 => 35, 167 => 34, 164 => 33, 161 => 32, 158 => 31, 155 => 30, 152 => 29, 149 => 28, 146 => 27, 143 => 26, 125 => 25, 123 => 24, 120 => 23, 114 => 21, 111 => 20, 108 => 19, 105 => 18, 102 => 17, 99 => 16, 96 => 15, 94 => 14, 92 => 13, 87 => 10, 84 => 9, 81 => 8, 78 => 7, 75 => 6, 72 => 5, 69 => 4, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{# extension.excerpt #}
{% block content %}
\t{% set name = \"\" %}
\t{% if app.request.attributes.get('structure').structure.name is defined and app.request.attributes.get('structure').structure.name is not empty %}
\t\t{% set name = app.request.attributes.get('structure').structure.name %}
\t{% endif %}
\t{% set values = ['Actualités', 'Newsletters'] %}
\t{% include \"articles-blocks/breadcrumb.html.twig\" with {titles : values} %}
\t<section class=\"single-article-container\">
\t\t<article>
\t\t\t<div class=\"mlr-1em\">
\t\t\t\t{% include \"articles-blocks/header.html.twig\" %}
\t\t\t\t{# <div class=\"creator\">{{ sulu_resolve_user(creator).fullName }}</div> #}
\t\t\t\t{% include \"articles/blocks/article-under-header.html.twig\" %}
\t\t\t\t{% if extension.excerpt.categories is defined and extension.excerpt.categories is not empty %}
\t\t\t\t\t{% set categories = extension.excerpt.categories %}
\t\t\t\t\t{% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
\t\t\t\t{% endif %}
\t\t\t\t{% if content.chapo is defined and content.chapo is not empty %}
\t\t\t\t\t<div class=\"fw500 lh28 fs20 text cgrey mt-40px\">{{ content.chapo|raw }}</div>
\t\t\t\t{% endif %}
\t\t\t</div>
\t\t\t{% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
\t\t\t\t{% for data in content.main_content %}
\t\t\t\t\t{% if data.type == \"sub_content\" %}
\t\t\t\t\t\t{% include \"articles-blocks/articles-content.html.twig\" %}
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% if data.type == \"linked_with\" %}
\t\t\t\t\t\t{% include \"articles-blocks/linked-with.html.twig\" %}
\t\t\t\t\t{% endif %}
\t\t\t\t\t{% if data.type == \"see_more\" %}
\t\t\t\t\t\t{% include \"articles-blocks/see-more.html.twig\" %}
\t\t\t\t\t{% endif %}
\t\t\t\t{% endfor %}
\t\t\t{% endif %}
\t\t</article>
\t</section>
{% endblock %}
", "articles/newsletters.html.twig", "/var/www/html/templates/articles/newsletters.html.twig");
}
}