<?php

/* home.html.twig */
class __TwigTemplate_7fe4981640c1b846664c2557520ed65bfae86a413c9247070928bc796a200d50 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("partials/base.html.twig", "home.html.twig", 1);
        $this->blocks = array(
            'javascripts' => array($this, 'block_javascripts'),
            'header_navigation' => array($this, 'block_header_navigation'),
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "partials/base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 3
        $context["show_onpage_menu"] = (($this->getAttribute(($context["header"] ?? null), "onpage_menu", array()) == true) || (null === $this->getAttribute(($context["header"] ?? null), "onpage_menu", array())));
        // line 4
        $context["cc"] = $this->getAttribute(($context["taxonomy"] ?? null), "findTaxonomy", array(0 => array("category" => "sous-menu")), "method");
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 8
    public function block_javascripts($context, array $blocks = array())
    {
        // line 9
        echo "    ";
        if (($context["show_onpage_menu"] ?? null)) {
            // line 10
            echo "    ";
        }
        // line 11
        echo "    ";
        $this->displayParentBlock("javascripts", $context, $blocks);
        echo "
";
    }

    // line 14
    public function block_header_navigation($context, array $blocks = array())
    {
        // line 15
        echo "    ";
        if (($context["show_onpage_menu"] ?? null)) {
            // line 16
            echo "        <ul class=\"navigation\">
        ";
            // line 17
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
            foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
                // line 18
                echo "            <li class=\"";
                echo $this->getAttribute($this->getAttribute($context["module"], "header", array()), "body_classes", array());
                echo "\">
              <a href=\"#";
                // line 19
                echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "folder", array())), "method");
                echo "\">";
                echo $this->getAttribute($context["module"], "menu", array());
                echo "</a>
                ";
                // line 20
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["module"], "collection", array()));
                foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
                    // line 21
                    echo "                  ";
                    if (twig_in_filter($context["child"], ($context["cc"] ?? null))) {
                        // line 22
                        echo "                  <ol>
                    <a href=\"#";
                        // line 23
                        echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["child"], "folder", array())), "method");
                        echo "\">";
                        echo $this->getAttribute($context["child"], "menu", array());
                        echo "</a>
                </ol>
                  ";
                    }
                    // line 26
                    echo "                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 27
                echo "            </li>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 29
            echo "
        </ul>
    ";
        } else {
            // line 32
            echo "        ";
            $this->displayParentBlock("header_navigation", $context, $blocks);
            echo "
    ";
        }
    }

    // line 36
    public function block_content($context, array $blocks = array())
    {
        // line 37
        echo "    ";
        echo $this->getAttribute(($context["page"] ?? null), "content", array());
        echo "
    ";
        // line 38
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
        foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
            // line 39
            echo "        <div id=\"";
            echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "folder", array())), "method");
            echo "\" class=\"column \">
        ";
            // line 40
            echo $this->getAttribute($context["module"], "content", array());
            echo "
        </div>
    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
    }

    // line 6
    public function getpageLinkName($__text__ = null, ...$__varargs__)
    {
        $context = $this->env->mergeGlobals(array(
            "text" => $__text__,
            "varargs" => $__varargs__,
        ));

        $blocks = array();

        ob_start();
        try {
            echo twig_replace_filter(twig_lower_filter($this->env, ($context["text"] ?? null)), array("01._" => "", "02._" => "", "03._" => "", "04._" => "", "05._" => "", "06._" => "", "07._" => "", "08._" => "", "09._" => ""));
        } catch (Exception $e) {
            ob_end_clean();

            throw $e;
        } catch (Throwable $e) {
            ob_end_clean();

            throw $e;
        }

        return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
    }

    public function getTemplateName()
    {
        return "home.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  147 => 6,  136 => 40,  131 => 39,  127 => 38,  122 => 37,  119 => 36,  111 => 32,  106 => 29,  99 => 27,  93 => 26,  85 => 23,  82 => 22,  79 => 21,  75 => 20,  69 => 19,  64 => 18,  60 => 17,  57 => 16,  54 => 15,  51 => 14,  44 => 11,  41 => 10,  38 => 9,  35 => 8,  31 => 1,  29 => 4,  27 => 3,  11 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("{% extends 'partials/base.html.twig' %}

{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
{% set cc = taxonomy.findTaxonomy({'category':'sous-menu'}) %}

{% macro pageLinkName(text) %}{{ text|lower|replace({'01._':'','02._':'','03._':'','04._':'','05._':'','06._':'','07._':'','08._':'','09._':''}) }}{% endmacro %}

{% block javascripts %}
    {% if show_onpage_menu %}
    {% endif %}
    {{ parent() }}
{% endblock %}

{% block header_navigation %}
    {% if show_onpage_menu %}
        <ul class=\"navigation\">
        {% for module in page.collection() %}
            <li class=\"{{module.header.body_classes}}\">
              <a href=\"#{{ _self.pageLinkName(module.folder) }}\">{{ module.menu }}</a>
                {% for child in module.collection %}
                  {% if child in cc %}
                  <ol>
                    <a href=\"#{{ _self.pageLinkName(child.folder) }}\">{{ child.menu }}</a>
                </ol>
                  {% endif %}
                {% endfor %}
            </li>
        {% endfor %}

        </ul>
    {% else %}
        {{  parent() }}
    {% endif %}
{% endblock %}

{% block content %}
    {{ page.content }}
    {% for module in page.collection() %}
        <div id=\"{{ _self.pageLinkName(module.folder) }}\" class=\"column \">
        {{ module.content }}
        </div>
    {% endfor %}
{% endblock %}
", "home.html.twig", "/mnt/data/Sites/static-ethica.net/user/themes/ethica/templates/home.html.twig");
    }
}
