X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2e29699c42e0c6dbbdce0133d1e6bbbea0e269b0..e71622d233660b5ba305d68e586d7d14ff2124e6:/doc/todo/a_navbar_based_on_page_properties.mdwn diff --git a/doc/todo/a_navbar_based_on_page_properties.mdwn b/doc/todo/a_navbar_based_on_page_properties.mdwn index b4f5b1cf0..091e0a39b 100644 --- a/doc/todo/a_navbar_based_on_page_properties.mdwn +++ b/doc/todo/a_navbar_based_on_page_properties.mdwn @@ -7,17 +7,23 @@ properties. So imagine four pages A, B, A/C, and A/D, and these pages would include the following directives, respectively - \[[navbar id=main priority=3]] - \[[navbar id=main priority=5]] - \[[navbar id=main title="Something else"]] - \[[navbar id=main]] - -then the computed navigation bar would be - - B - A - Something else - D + \[[!navbaritem navbar=main priority=3]] + \[[!navbaritem navbar=main priority=5]] + \[[!navbaritem navbar=main title="Something else"]] + \[[!navbaritem navbar=main]] + +then one could insert `\[[!navbar id=main maxlevels=0]]` somewhere and it +would get replaced with (this being in the context of viewing page C): + +
B would sort before A because it has a higher priority, but C would sort before D because their priorities are equal. The overridden title is not used @@ -29,5 +35,14 @@ I don't think this is hard to code up and it's what I've been using with [rest2web](http://www.voidspace.org.uk/python/rest2web/) and it's served me well. +There is a problem though if this navbar were included in a sidebar (the logical place): if a page is updated, the navbar needs to be rebuilt which causes the sidebar to be rebuilt, which causes the whole site to be rebuilt. Unless we can subscribe only to title changes, this will be pretty bad... + --[[madduck]] + +> I've just written a plugin for a automatically created menu for use +> [here](http://www.ff-egersdorf-wachendorf.de/). The source is at +> [gitorious](http://gitorious.org/ikiwiki-plugins/automenu). The problem with +> rebuilding remains unsolved but doesn't matter that much for me as I always +> generate the web site myself, ie it's not really a wiki. --[[lnussel]] + [[!tag wishlist]]