mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add new option for controlling whether to display categories on menu or not
Conflicts: docs/changelog.rst pelican/tests/output/basic/tag/bar.html pelican/tests/output/basic/tag/baz.html pelican/tests/output/basic/tag/foo.html pelican/tests/output/custom/tag/bar.html pelican/tests/output/custom/tag/baz.html pelican/tests/output/custom/tag/foo.html
This commit is contained in:
parent
f35206660b
commit
e042e11c23
66 changed files with 136 additions and 126 deletions
|
|
@ -31,14 +31,16 @@
|
|||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% if DISPLAY_PAGES_ON_MENU -%}
|
||||
{% for page in PAGES %}
|
||||
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU -%}
|
||||
{% for cat, null in categories %}
|
||||
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
{% block content %}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,11 @@
|
|||
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul></nav><!-- /#menu -->
|
||||
{% block content %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue