Limit the menu generation to a namespace
From a request:
I really like this type of menu. Would it be possible to limit the menu generation to a namespace? for example by making
<acmenu ns:ns1>
; so it would be possible to refine the sidebar display, and to display the tree structure of a namespace even when we are in another namespace.
Comments (6)
-
reporter -
reporter From the OP:
Not really this… Maybe better with a real example, it is hard to explain :) I had a wiki and I had create navigation with namespace and tag in the namespace
fr:tag:start
. When I am on the root of wiki, I want a sidebar who show only tree structure offr:tag:
. I can't use hidepage for other pages onfr:
because… there are a lot and it is useful to see them by other way. So, actually, if I add<acmenu>
in my root sidebar, it display more than I want to show. -
reporter Maybe I have understand: when you are in
fr:
you want to see the content offr:tag:
.If so, this is beyond the main aim of this plugin but it can be obtained using AcMenu with Include.
This means that in
fr:sidebar
you will use:{{page>fr:tag:sidebar&nofooter&noeditbutton}}
Unfortunately they don't work as I would expect because, from a rapid test, AcMenu still shows all namescpaces and their pages and not only the namespace required (in your case only
fr:tag:
).I will try to fix this behaviour, if possible.
-
reporter -
assigned issue to
- marked as enhancement
- marked as major
-
assigned issue to
-
reporter The problem is in
_get_base()
insyntax.php
because$path = $INFO["filepath"];
returns the path of the main page and not the path of the sidebar. Unluckily it seems to be not possible to retrieve the id of the page in which the Lexer has found the pattern<acmenu>
, I mean there is no event that returns such information. -
reporter - marked as minor
- Log in to comment
Referring to https://www.dokuwiki.org/plugin:acmenu#Examples, I've created three
sidebar.txt
file.When you are in the root namespace you can navigate through all its sub-namespaces, that is
branch-a
andbranch-b
. Suppose now to open any page in the namespacebranch-*
, then you will see only its menu. Remember to add a back link.I hope I got right what you are asking for.