]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/tips/parentlinks_style.mdwn
Frohdo - new personal website added
[git.ikiwiki.info.git] / doc / tips / parentlinks_style.mdwn
index 5294e545277dc30e3ce86f6d6f200abab8289660..617793de4cc5a2191953b89806738875aed94622 100644 (file)
@@ -1,3 +1,5 @@
+[[!meta date="2008-07-16 17:43:57 -0400"]]
+
 Here are some tips for ways to style the links
 provided by the [[plugins/parentlinks]] plugin.
 
@@ -6,7 +8,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 +79,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
 ------------------