[doc] Add option to select the active sidebar item
If the page contains the variable "sidebaractiveurl" in the yaml frontmatter, this is additionally used to select the active item in the sidebar. Useful, if the page doesn't have its own item, but wants to activate e.g. the parent page.
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
{% if folderitem.output contains "web" %}
|
||||
{% if folderitem.external_url %}
|
||||
<li><a href="{{folderitem.external_url}}" target="_blank">{{folderitem.title}}</a></li>
|
||||
{% elsif page.url == folderitem.url %}
|
||||
{% elsif page.url == folderitem.url or page.sidebaractiveurl == folderitem.url %}
|
||||
<li class="active"><a href="{{folderitem.url | remove: "/"}}">{{folderitem.title}}</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{folderitem.url | remove: "/"}}">{{folderitem.title}}</a></li>
|
||||
|
Reference in New Issue
Block a user