aboutsummaryrefslogtreecommitdiff
path: root/doc/tips/parentlinks_style.mdwn
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-29 10:32:02 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-29 10:32:02 -0400
commitc4784a437d82c2c7747ffc600ac54355130b2ac0 (patch)
treecb110fd08c2b79a1cf7471019532de2269e98a84 /doc/tips/parentlinks_style.mdwn
parentce785c87022842a53eda6a25088eb4299907f938 (diff)
downloadikiwiki-c4784a437d82c2c7747ffc600ac54355130b2ac0.tar
ikiwiki-c4784a437d82c2c7747ffc600ac54355130b2ac0.tar.gz
add an example of how to use the recently added HAS_PARENTLINKS
Diffstat (limited to 'doc/tips/parentlinks_style.mdwn')
-rw-r--r--doc/tips/parentlinks_style.mdwn18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn
index b992a11a0..8b95cd396 100644
--- a/doc/tips/parentlinks_style.mdwn
+++ b/doc/tips/parentlinks_style.mdwn
@@ -82,6 +82,24 @@ following lines in `page.tmpl`:
Then write the appropriate CSS bits for `a.height1`, etc.
+Avoid showing title of toplevel index page
+------------------------------------------
+
+If you don't like having "index" appear on the top page of the wiki,
+but you do want to see the name of the page otherwise, you can use a
+special `HAS_PARENTLINKS` template variable that the plugin provides.
+It is true for every page *except* the toplevel index.
+
+Here is an example of using it to hide the title of the toplevel index
+page:
+
+ <TMPL_LOOP NAME="PARENTLINKS">
+ <a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/
+ </TMPL_LOOP>
+ <TMPL_IF HAS_PARENTLINKS>
+ <TMPL_VAR TITLE>
+ </TMPL_IF>
+
Full-blown example
------------------