summaryrefslogtreecommitdiff
path: root/doc/todo/a_navbar_based_on_page_properties.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2008-03-18 07:14:57 -0400
committerJoey Hess <joey@kitenet.net>2008-03-18 07:14:57 -0400
commit2317ce58b0bdda0ba850bae938e3b36715bb258a (patch)
tree5b93f4144178793d48e77816cab27e9e1aea5747 /doc/todo/a_navbar_based_on_page_properties.mdwn
parent16c7dfa733a3cbec43a976cccdf86a7798e946c5 (diff)
web commit by http://madduck.net/
Diffstat (limited to 'doc/todo/a_navbar_based_on_page_properties.mdwn')
-rw-r--r--doc/todo/a_navbar_based_on_page_properties.mdwn32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/todo/a_navbar_based_on_page_properties.mdwn b/doc/todo/a_navbar_based_on_page_properties.mdwn
new file mode 100644
index 000000000..b158ced43
--- /dev/null
+++ b/doc/todo/a_navbar_based_on_page_properties.mdwn
@@ -0,0 +1,32 @@
+One thing I don't like about Tobi's `navbar.pm` is that the navigation bar is
+hardcoded instead of computed from what's available. Obviously, this allows
+for a very customised `navbar` (i.e. not making all pages show up, like
+a `map` would). However, I think this could also be achieved through page
+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
+
+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
+for sorting.
+
+Also, the code automatically deduces that C and D are second-level under A.
+
+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.
+
+--[[madduck]]