ff7b0ce4ec8a413ba37fe4c70668b235c585141acc962245fc06dd4cfafd30b4.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. <?php
  2. /* home.html.twig */
  3. class __TwigTemplate_7fe4981640c1b846664c2557520ed65bfae86a413c9247070928bc796a200d50 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. // line 1
  9. $this->parent = $this->loadTemplate("partials/base.html.twig", "home.html.twig", 1);
  10. $this->blocks = array(
  11. 'javascripts' => array($this, 'block_javascripts'),
  12. 'header_navigation' => array($this, 'block_header_navigation'),
  13. 'content' => array($this, 'block_content'),
  14. );
  15. }
  16. protected function doGetParent(array $context)
  17. {
  18. return "partials/base.html.twig";
  19. }
  20. protected function doDisplay(array $context, array $blocks = array())
  21. {
  22. // line 3
  23. $context["show_onpage_menu"] = (($this->getAttribute(($context["header"] ?? null), "onpage_menu", array()) == true) || (null === $this->getAttribute(($context["header"] ?? null), "onpage_menu", array())));
  24. // line 4
  25. $context["cc"] = $this->getAttribute(($context["taxonomy"] ?? null), "findTaxonomy", array(0 => array("category" => "sous-menu")), "method");
  26. // line 1
  27. $this->parent->display($context, array_merge($this->blocks, $blocks));
  28. }
  29. // line 8
  30. public function block_javascripts($context, array $blocks = array())
  31. {
  32. // line 9
  33. echo " ";
  34. if (($context["show_onpage_menu"] ?? null)) {
  35. // line 10
  36. echo " ";
  37. }
  38. // line 11
  39. echo " ";
  40. $this->displayParentBlock("javascripts", $context, $blocks);
  41. echo "
  42. ";
  43. }
  44. // line 14
  45. public function block_header_navigation($context, array $blocks = array())
  46. {
  47. // line 15
  48. echo " ";
  49. if (($context["show_onpage_menu"] ?? null)) {
  50. // line 16
  51. echo " <ul class=\"navigation\">
  52. ";
  53. // line 17
  54. $context['_parent'] = $context;
  55. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
  56. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  57. // line 18
  58. echo " <li class=\"";
  59. echo $this->getAttribute($this->getAttribute($context["module"], "header", array()), "body_classes", array());
  60. echo "\">
  61. <a href=\"#";
  62. // line 19
  63. echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "folder", array())), "method");
  64. echo "\">";
  65. echo $this->getAttribute($context["module"], "menu", array());
  66. echo "</a>
  67. ";
  68. // line 20
  69. $context['_parent'] = $context;
  70. $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["module"], "collection", array()));
  71. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  72. // line 21
  73. echo " ";
  74. if (twig_in_filter($context["child"], ($context["cc"] ?? null))) {
  75. // line 22
  76. echo " <ol>
  77. <a href=\"#";
  78. // line 23
  79. echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["child"], "folder", array())), "method");
  80. echo "\">";
  81. echo $this->getAttribute($context["child"], "menu", array());
  82. echo "</a>
  83. </ol>
  84. ";
  85. }
  86. // line 26
  87. echo " ";
  88. }
  89. $_parent = $context['_parent'];
  90. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  91. $context = array_intersect_key($context, $_parent) + $_parent;
  92. // line 27
  93. echo " </li>
  94. ";
  95. }
  96. $_parent = $context['_parent'];
  97. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 29
  100. echo "
  101. </ul>
  102. ";
  103. } else {
  104. // line 32
  105. echo " ";
  106. $this->displayParentBlock("header_navigation", $context, $blocks);
  107. echo "
  108. ";
  109. }
  110. }
  111. // line 36
  112. public function block_content($context, array $blocks = array())
  113. {
  114. // line 37
  115. echo " ";
  116. echo $this->getAttribute(($context["page"] ?? null), "content", array());
  117. echo "
  118. ";
  119. // line 38
  120. $context['_parent'] = $context;
  121. $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
  122. foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
  123. // line 39
  124. echo " <div id=\"";
  125. echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "folder", array())), "method");
  126. echo "\" class=\"column \">
  127. ";
  128. // line 40
  129. echo $this->getAttribute($context["module"], "content", array());
  130. echo "
  131. </div>
  132. ";
  133. }
  134. $_parent = $context['_parent'];
  135. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
  136. $context = array_intersect_key($context, $_parent) + $_parent;
  137. }
  138. // line 6
  139. public function getpageLinkName($__text__ = null, ...$__varargs__)
  140. {
  141. $context = $this->env->mergeGlobals(array(
  142. "text" => $__text__,
  143. "varargs" => $__varargs__,
  144. ));
  145. $blocks = array();
  146. ob_start();
  147. try {
  148. echo twig_replace_filter(twig_lower_filter($this->env, ($context["text"] ?? null)), array("01._" => "", "02._" => "", "03._" => "", "04._" => "", "05._" => "", "06._" => "", "07._" => "", "08._" => "", "09._" => ""));
  149. } catch (Exception $e) {
  150. ob_end_clean();
  151. throw $e;
  152. } catch (Throwable $e) {
  153. ob_end_clean();
  154. throw $e;
  155. }
  156. return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  157. }
  158. public function getTemplateName()
  159. {
  160. return "home.html.twig";
  161. }
  162. public function isTraitable()
  163. {
  164. return false;
  165. }
  166. public function getDebugInfo()
  167. {
  168. 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,);
  169. }
  170. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  171. public function getSource()
  172. {
  173. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  174. return $this->getSourceContext()->getCode();
  175. }
  176. public function getSourceContext()
  177. {
  178. return new Twig_Source("{% extends 'partials/base.html.twig' %}
  179. {% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
  180. {% set cc = taxonomy.findTaxonomy({'category':'sous-menu'}) %}
  181. {% macro pageLinkName(text) %}{{ text|lower|replace({'01._':'','02._':'','03._':'','04._':'','05._':'','06._':'','07._':'','08._':'','09._':''}) }}{% endmacro %}
  182. {% block javascripts %}
  183. {% if show_onpage_menu %}
  184. {% endif %}
  185. {{ parent() }}
  186. {% endblock %}
  187. {% block header_navigation %}
  188. {% if show_onpage_menu %}
  189. <ul class=\"navigation\">
  190. {% for module in page.collection() %}
  191. <li class=\"{{module.header.body_classes}}\">
  192. <a href=\"#{{ _self.pageLinkName(module.folder) }}\">{{ module.menu }}</a>
  193. {% for child in module.collection %}
  194. {% if child in cc %}
  195. <ol>
  196. <a href=\"#{{ _self.pageLinkName(child.folder) }}\">{{ child.menu }}</a>
  197. </ol>
  198. {% endif %}
  199. {% endfor %}
  200. </li>
  201. {% endfor %}
  202. </ul>
  203. {% else %}
  204. {{ parent() }}
  205. {% endif %}
  206. {% endblock %}
  207. {% block content %}
  208. {{ page.content }}
  209. {% for module in page.collection() %}
  210. <div id=\"{{ _self.pageLinkName(module.folder) }}\" class=\"column \">
  211. {{ module.content }}
  212. </div>
  213. {% endfor %}
  214. {% endblock %}
  215. ", "home.html.twig", "/mnt/data/Sites/static-ethica.net/user/themes/ethica/templates/home.html.twig");
  216. }
  217. }