<?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/articles.html.twig */
class __TwigTemplate_ad28aab8d143ef96bea6a769f0ed24d706f587a6242649c629a559b059d97c1e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'style' => [$this, 'block_style'],
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
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/articles.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/articles.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "articles/articles.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_style($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", "style"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "style"));
// line 4
yield " ";
yield from $this->yieldParentBlock("style", $context, $blocks);
yield "
";
// line 5
yield from $this->loadTemplate("articles/styles/base-css-logic.html.twig", "articles/articles.html.twig", 5)->unwrap()->yield($context);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 7
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 8
yield " ";
$context["name"] = "";
// line 9
yield " ";
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, 9), "attributes", [], "any", false, true, false, 9), "get", ["structure"], "method", false, true, false, 9), "structure", [], "any", false, true, false, 9), "name", [], "any", true, true, false, 9) && !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.', 9, $this->source); })()), "request", [], "any", false, false, false, 9), "attributes", [], "any", false, false, false, 9), "get", ["structure"], "method", false, false, false, 9), "structure", [], "any", false, false, false, 9), "name", [], "any", false, false, false, 9)))) {
// line 10
yield " ";
$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.', 10, $this->source); })()), "request", [], "any", false, false, false, 10), "attributes", [], "any", false, false, false, 10), "get", ["structure"], "method", false, false, false, 10), "structure", [], "any", false, false, false, 10), "name", [], "any", false, false, false, 10);
// line 11
yield " ";
}
// line 12
yield " ";
$context["values"] = "";
// line 13
yield " ";
if ((0 === CoreExtension::compare((isset($context["name"]) || array_key_exists("name", $context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.', 13, $this->source); })()), "guides_outils"))) {
// line 14
yield " ";
$context["values"] = ["Ressources", "Guides et outils"];
// line 15
yield " ";
} elseif ((0 === CoreExtension::compare((isset($context["name"]) || array_key_exists("name", $context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.', 15, $this->source); })()), "analyses"))) {
// line 16
yield " ";
$context["values"] = ["Ressources", "Analyses"];
// line 17
yield " ";
} else {
// line 18
yield " ";
$context["values"] = ["Actualités", "Articles"];
// line 19
yield " ";
}
// line 20
yield " ";
yield from $this->loadTemplate("articles-blocks/breadcrumb.html.twig", "articles/articles.html.twig", 20)->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.', 20, $this->source); })())]));
// line 21
yield " <div class=\"main-container w100 plr-1em\">
<section class=\"single-article-container\">
<article>
";
// line 24
yield from $this->loadTemplate("articles-blocks/header.html.twig", "articles/articles.html.twig", 24)->unwrap()->yield($context);
// line 25
yield " ";
// line 26
yield " ";
yield from $this->loadTemplate("articles/blocks/article-under-header.html.twig", "articles/articles.html.twig", 26)->unwrap()->yield($context);
// line 27
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["extension"] ?? null), "excerpt", [], "any", false, true, false, 27), "categories", [], "any", true, true, false, 27) && !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.', 27, $this->source); })()), "excerpt", [], "any", false, false, false, 27), "categories", [], "any", false, false, false, 27)))) {
// line 28
yield " ";
$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.', 28, $this->source); })()), "excerpt", [], "any", false, false, false, 28), "categories", [], "any", false, false, false, 28);
// line 29
yield " ";
yield from $this->loadTemplate("blocks/previews-from-controller/blocks/categories.html.twig", "articles/articles.html.twig", 29)->unwrap()->yield($context);
// line 30
yield " ";
}
// line 31
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "chapo", [], "any", true, true, false, 31) && !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.', 31, $this->source); })()), "chapo", [], "any", false, false, false, 31)))) {
// line 32
yield " <div class=\"fw500 lh28 fs20 text cgrey mt-40px\">
";
// line 33
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.', 33, $this->source); })()), "chapo", [], "any", false, false, false, 33);
yield "
</div>
";
}
// line 36
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "main_content", [], "any", true, true, false, 36) && !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.', 36, $this->source); })()), "main_content", [], "any", false, false, false, 36))) && (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.', 36, $this->source); })()), "main_content", [], "any", false, false, false, 36)), 0)))) {
// line 37
yield " ";
$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.', 37, $this->source); })()), "main_content", [], "any", false, false, false, 37));
$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 38
yield " ";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 38), "sub_content"))) {
// line 39
yield " ";
yield from $this->loadTemplate("articles-blocks/articles-content.html.twig", "articles/articles.html.twig", 39)->unwrap()->yield($context);
// line 40
yield " ";
}
// line 41
yield " ";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 41), "linked_with"))) {
// line 42
yield " ";
yield from $this->loadTemplate("articles-blocks/linked-with.html.twig", "articles/articles.html.twig", 42)->unwrap()->yield($context);
// line 43
yield " ";
}
// line 44
yield " ";
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["data"], "type", [], "any", false, false, false, 44), "see_more"))) {
// line 45
yield " ";
yield from $this->loadTemplate("articles-blocks/see-more.html.twig", "articles/articles.html.twig", 45)->unwrap()->yield($context);
// line 46
yield " ";
}
// line 47
yield " ";
++$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 48
yield " ";
}
// line 49
yield " </article>
</section>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 53
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 54
yield " ";
yield from $this->loadTemplate("articles/javascripts/base-article-js.html.twig", "articles/articles.html.twig", 54)->unwrap()->yield($context);
// line 55
yield " ";
yield from $this->yieldParentBlock("javascripts", $context, $blocks);
yield "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "articles/articles.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 264 => 55, 261 => 54, 251 => 53, 237 => 49, 234 => 48, 220 => 47, 217 => 46, 214 => 45, 211 => 44, 208 => 43, 205 => 42, 202 => 41, 199 => 40, 196 => 39, 193 => 38, 175 => 37, 172 => 36, 166 => 33, 163 => 32, 160 => 31, 157 => 30, 154 => 29, 151 => 28, 148 => 27, 145 => 26, 143 => 25, 141 => 24, 136 => 21, 133 => 20, 130 => 19, 127 => 18, 124 => 17, 121 => 16, 118 => 15, 115 => 14, 112 => 13, 109 => 12, 106 => 11, 103 => 10, 100 => 9, 97 => 8, 87 => 7, 76 => 5, 71 => 4, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"base.html.twig\" %}
{# extension.excerpt #}
{% block style %}
{{ parent() }}
{% include \"articles/styles/base-css-logic.html.twig\" %}
{% endblock %}
{% block content %}
{% set name = \"\" %}
{% if app.request.attributes.get('structure').structure.name is defined and app.request.attributes.get('structure').structure.name is not empty %}
{% set name = app.request.attributes.get('structure').structure.name %}
{% endif %}
{% set values = \"\" %}
{% if name == \"guides_outils\" %}
{% set values = ['Ressources', 'Guides et outils'] %}
{% elseif name == \"analyses\" %}
{% set values = ['Ressources', 'Analyses'] %}
{% else %}
{% set values = ['Actualités', 'Articles'] %}
{% endif %}
{% include \"articles-blocks/breadcrumb.html.twig\" with {titles : values} %}
<div class=\"main-container w100 plr-1em\">
<section class=\"single-article-container\">
<article>
{% include \"articles-blocks/header.html.twig\" %}
{# <div class=\"creator\">{{ sulu_resolve_user(creator).fullName }}</div> #}
{% include \"articles/blocks/article-under-header.html.twig\" %}
{% if extension.excerpt.categories is defined and extension.excerpt.categories is not empty %}
{% set categories = extension.excerpt.categories %}
{% include \"blocks/previews-from-controller/blocks/categories.html.twig\" %}
{% endif %}
{% if content.chapo is defined and content.chapo is not empty %}
<div class=\"fw500 lh28 fs20 text cgrey mt-40px\">
{{ content.chapo|raw }}
</div>
{% endif %}
{% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}
{% for data in content.main_content %}
{% if data.type == \"sub_content\" %}
{% include \"articles-blocks/articles-content.html.twig\" %}
{% endif %}
{% if data.type == \"linked_with\" %}
{% include \"articles-blocks/linked-with.html.twig\" %}
{% endif %}
{% if data.type == \"see_more\" %}
{% include \"articles-blocks/see-more.html.twig\" %}
{% endif %}
{% endfor %}
{% endif %}
</article>
</section>
</div>
{% endblock %}
{% block javascripts %}
{% include \"articles/javascripts/base-article-js.html.twig\" %}
{{ parent() }}
{% endblock %}", "articles/articles.html.twig", "/var/www/html/templates/articles/articles.html.twig");
}
}