:css: {filename}/static/dummy.css
{filename}/static/dummy.css
:summary: um
+:highlight: pelican/theme
:header:
.. note-warning::
This shouldn't be wrapped in a ``<p>``.
This page should have a breadcrumb, summary in a meta tag, header and a footer
-and also two additional links to ``/static/dummy.css``.
+and also two additional links to ``/static/dummy.css``. It should also
+highlight the Pelican Theme menu item in the top navbar.
Page title is rendered in an :html:`<h1>` and there's nothing else apart from
the page content.
+Pages can override which menu item in the `top navbar`_ will be highlighted
+by specifying the corresponding menu item slug in the :rst:`:highlight:` field.
+If the field is not present, page's own slug is used instead.
+
`Extra CSS`_
------------
<ol class="m-col-t-6 m-col-m-none">
{% for title, link, slug, sub in LINKS_NAVBAR1 %}
<li>
- <a href="{{ link }}"{% if slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a>
+ <a href="{{ link }}"{% if (page and page.highlight == slug) or slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a>
{% if sub %}
<ol>
{% for title, link, slug in sub %}
- <li><a href="{{ link }}"{% if slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
+ <li><a href="{{ link }}"{% if (page and page.highlight == slug) or slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
{% endfor %}
</ol>
{% endif %}
<ol class="m-col-t-6 m-col-m-none">
{% for title, link, slug, sub in LINKS_NAVBAR2 %}
<li>
- <a href="{{ link }}"{% if slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a>
+ <a href="{{ link }}"{% if (page and page.highlight == slug) or slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a>
{% if sub %}
<ol>
{% for title, link, slug in sub %}
- <li><a href="{{ link }}"{% if slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
+ <li><a href="{{ link }}"{% if (page and page.highlight == slug) or slug == page_slug %} id="m-navbar-current"{% endif %}>{{ title }}</a></li>
{% endfor %}
</ol>
{% endif %}