]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/tips/parentlinks_style.mdwn
add an example of how to use the recently added HAS_PARENTLINKS
[ikiwiki.git] / doc / tips / parentlinks_style.mdwn
index b10d7cf567deb24b35d2a0b6cca4a6faf8aa6038..8b95cd39647d6e1230aba776badf9ac98c306d4c 100644 (file)
@@ -77,11 +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_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
 ------------------