summaryrefslogtreecommitdiff
path: root/doc/tips/parentlinks_style.mdwn
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-08-27 10:01:58 +0200
committerJonas Smedegaard <dr@jones.dk>2010-08-27 10:01:58 +0200
commitf398ad035b973608d380c9939ea845d8e2a0cdc2 (patch)
tree1ba1a0c94e375ab8ed609eaa57a542c6b87de5a8 /doc/tips/parentlinks_style.mdwn
parent958e5735c946263a111420fe47abe58782581e8c (diff)
parent6d213a0c739d5b34357b01a616f99197eeba6ad9 (diff)
Merge branch 'master' of git://git.ikiwiki.info
Diffstat (limited to 'doc/tips/parentlinks_style.mdwn')
-rw-r--r--doc/tips/parentlinks_style.mdwn21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/tips/parentlinks_style.mdwn b/doc/tips/parentlinks_style.mdwn
index 5294e5452..f9dfa8f55 100644
--- a/doc/tips/parentlinks_style.mdwn
+++ b/doc/tips/parentlinks_style.mdwn
@@ -6,7 +6,7 @@ a subset of a page's parents. It also provides a few bonus
possibilities, such as styling the parent links depending on their
place in the path.
-[[!toc ]]
+[[!toc levels=2]]
Content
=======
@@ -77,10 +77,29 @@ following lines in `page.tmpl`:
<a href="<TMPL_VAR NAME="URL">" class="height<TMPL_VAR NAME="HEIGHT">">
<TMPL_VAR NAME="PAGE">
</a> /
+ </TMPL_IF>
</TMPL_LOOP>
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
------------------