Open ghost opened 9 years ago
I built a local navigation which might be useful for your use case:
// Local navigation depending on the page "local_navigation" in the namespace of the displayed page
$_vector_boxes["example1"]["headline"] = "Local navigation";
$_vector_boxes["example1"]["xhtml"] = tpl_include_page(getNS(cleanID(getID())).":local_navigation", false);
I'd like to be able to build the navigation box depending on the current namespace. If the navigation page is specified relative in
vector_navigation_location
(page name without a namespace, or.:pagename
for example), the navigation page should be searched in the current namespace. If there is no navigation page, search parent namespaces up to root --> inherit. This behaviour is similar to https://www.dokuwiki.org/namespace_templates search mechanism.To prevent this suggested behaviour, simply use an absolute page name like
:wiki:navigation
by checking if first char is a:
.