ee96a6c0181ced89a3a483176f1955cccf677d278c58b569e0539a081704b626.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. /* partials/navigation.html.twig */
  3. class __TwigTemplate_a5a0d6707a9694c96990718f858ab269ba601539c8362d5f92578f18760e6278 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->parent = false;
  9. $this->blocks = array(
  10. );
  11. }
  12. protected function doDisplay(array $context, array $blocks = array())
  13. {
  14. // line 22
  15. echo "
  16. <ul ";
  17. // line 23
  18. echo ((($context["tree"] ?? null)) ? ("class=\"tree\"") : (""));
  19. echo ">
  20. ";
  21. // line 24
  22. echo $this->getAttribute($this, "nav_loop", array(0 => ($context["pages"] ?? null)), "method");
  23. echo "
  24. </ul>
  25. ";
  26. }
  27. // line 1
  28. public function getnav_loop($__page__ = null, ...$__varargs__)
  29. {
  30. $context = $this->env->mergeGlobals(array(
  31. "page" => $__page__,
  32. "varargs" => $__varargs__,
  33. ));
  34. $blocks = array();
  35. ob_start();
  36. try {
  37. // line 2
  38. echo " ";
  39. $context['_parent'] = $context;
  40. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(($context["page"] ?? null), "children", array()), "visible", array()));
  41. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  42. // line 3
  43. echo " ";
  44. $context["active_page"] = ((($this->getAttribute($context["p"], "active", array()) || $this->getAttribute($context["p"], "activeChild", array()))) ? ("active") : (""));
  45. // line 4
  46. echo " ";
  47. if (($this->getAttribute($this->getAttribute($this->getAttribute($context["p"], "children", array()), "visible", array()), "count", array()) > 0)) {
  48. // line 5
  49. echo " <li>
  50. <a href=\"";
  51. // line 6
  52. echo $this->getAttribute($context["p"], "url", array());
  53. echo "\" class=\"";
  54. echo ($context["active_page"] ?? null);
  55. echo "\">
  56. ";
  57. // line 7
  58. echo $this->getAttribute($context["p"], "menu", array());
  59. echo "
  60. </a>
  61. <ul>
  62. ";
  63. // line 10
  64. echo $this->getAttribute($this, "nav_loop", array(0 => $context["p"]), "method");
  65. echo "
  66. </ul>
  67. </li>
  68. ";
  69. } else {
  70. // line 14
  71. echo " <li>
  72. <a href=\"";
  73. // line 15
  74. echo $this->getAttribute($context["p"], "url", array());
  75. echo "\" class=\"";
  76. echo ($context["active_page"] ?? null);
  77. echo "\">
  78. ";
  79. // line 16
  80. echo $this->getAttribute($context["p"], "menu", array());
  81. echo "
  82. </a>
  83. </li>
  84. ";
  85. }
  86. // line 20
  87. echo " ";
  88. }
  89. $_parent = $context['_parent'];
  90. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  91. $context = array_intersect_key($context, $_parent) + $_parent;
  92. } catch (Exception $e) {
  93. ob_end_clean();
  94. throw $e;
  95. } catch (Throwable $e) {
  96. ob_end_clean();
  97. throw $e;
  98. }
  99. return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  100. }
  101. public function getTemplateName()
  102. {
  103. return "partials/navigation.html.twig";
  104. }
  105. public function isTraitable()
  106. {
  107. return false;
  108. }
  109. public function getDebugInfo()
  110. {
  111. return array ( 95 => 20, 88 => 16, 82 => 15, 79 => 14, 72 => 10, 66 => 7, 60 => 6, 57 => 5, 54 => 4, 51 => 3, 46 => 2, 34 => 1, 26 => 24, 22 => 23, 19 => 22,);
  112. }
  113. /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
  114. public function getSource()
  115. {
  116. @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
  117. return $this->getSourceContext()->getCode();
  118. }
  119. public function getSourceContext()
  120. {
  121. return new Twig_Source("{% macro nav_loop(page) %}
  122. {% for p in page.children.visible %}
  123. {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  124. {% if p.children.visible.count > 0 %}
  125. <li>
  126. <a href=\"{{ p.url }}\" class=\"{{ active_page }}\">
  127. {{ p.menu }}
  128. </a>
  129. <ul>
  130. {{ _self.nav_loop(p) }}
  131. </ul>
  132. </li>
  133. {% else %}
  134. <li>
  135. <a href=\"{{ p.url }}\" class=\"{{ active_page }}\">
  136. {{ p.menu }}
  137. </a>
  138. </li>
  139. {% endif %}
  140. {% endfor %}
  141. {% endmacro %}
  142. <ul {{ tree ? 'class=\"tree\"' : '' }}>
  143. {{ _self.nav_loop(pages) }}
  144. </ul>
  145. ", "partials/navigation.html.twig", "/mnt/data/Sites/r2c.net/user/themes/r2c/templates/partials/navigation.html.twig");
  146. }
  147. }