]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/todo/a_navbar_based_on_page_properties.mdwn
web commit by http://madduck.net/: more details
[git.ikiwiki.info.git] / doc / todo / a_navbar_based_on_page_properties.mdwn
index b4f5b1cf061bc0ff80595b54039208395817039f..f88a3e802165d7c2b89abdd298133b60f56d280c 100644 (file)
@@ -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):
+
+    <ol class="navbar" id="navbar_main">
+      <li><a href="../B">B</a></li>
+      <li><a href="../A">A</a>
+        <ol>
+          <li class="current">Something else</li>
+          <li><a href="D">D</a></li>
+        </ol>
+      </li>
+    </ol>
 
 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