X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/486f460132434db1eaff92dcadb265011f394bf1..35668b87d3247a7de6c4dbb9edd7e0d909603524:/doc/plugins/parentlinks.mdwn?ds=sidebyside
diff --git a/doc/plugins/parentlinks.mdwn b/doc/plugins/parentlinks.mdwn
index 15c032838..ff4139390 100644
--- a/doc/plugins/parentlinks.mdwn
+++ b/doc/plugins/parentlinks.mdwn
@@ -1,20 +1,19 @@
-[[!template id=plugin name=pedigree author="intrigeri"]]
-[[!tag type/useful]]
+[[!template id=plugin name=parentlinks core=1 author="[[intrigeri]]"]]
+[[!tag type/link]]
This plugin offers a `HTML::Template` loop that iterates over all or
-a subset of a page's parents, providing a few bonus possibilities,
-such as styling the parent links depending on their place in the path.
-One can think of pedigree as "`PARENTLINKS` on steroids".
+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 ]]
Content
=======
-This plugin provides one template loop, called `PEDIGREE`, that
-returns the same parents list as `PARENTLINKS` would; as a bonus,
-every path element returned by the `PEDIGREE` loop has the following
-variables set:
+This plugin provides one template loop, called `PARENTLINKS`, that
+returns the list of parent pages for the current page. Every returned
+path element has the following variables set:
* `URL` (string): url to the current path element
* `PAGE` (string): title of the current path element
@@ -38,6 +37,18 @@ The `DEPTH` and `HEIGHT` variables allow the template writer to apply
general treatment, depending on one of these variables, to *every*
parent: they are counters.
+Basic usage
+-----------
+
+As in the default `page.tmpl`, one can simply display the list of
+parent pages:
+
+
+ /
+
+
+
+
Styling parents depending on their depth
----------------------------------------
@@ -45,7 +56,7 @@ Say you want the parent links to be styled depending on their depth in
the path going from the wiki root to the current page; just add the
following lines in `page.tmpl`:
-
+
" class="depth">
/
@@ -60,7 +71,7 @@ Say you want to display all the parents links but the wiki homepage,
styled depending on their distance to the current page; just add the
following lines in `page.tmpl`:
-
+
" class="height">
@@ -81,7 +92,7 @@ and/or CSS generated for some special path components; e.g.:
-
+
@@ -94,7 +105,7 @@ and/or CSS generated for some special path components; e.g.:
-
+