<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <head> <title> WebMake: Documentation: sitetree.wmk </title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="generator" content="WebMake/2.3" /> <style type="text/css"> body { background-color: #ffffff; color: #000000; line-height: 110%; margin-left: 10px; margin-right: 10px; } p, table, td, th { font-family: verdana,lucida,helvetica,sans-serif; font-size: 11px; line-height: 110%; } pre { margin-left: 3%; white-space: pre; } code, samp, pre, p pre { font-family: "lucida console", "Courier New", courier, "fixed-width", monospace; font-weight: bold; } H1 { font-size: 150%; font-family: Garamond, "Book Antiqua",Times,serif; background: #FFCC66; text-align: center; padding: 0.5em 1em 0.5em 1em; border-width: 1px; border-color: black; border-style: solid; line-height: 120%; } H2 { font-size: 125%; font-family: Garamond, "Book Antiqua",Times,serif; background: #FFDD77; text-align: center; padding: 0.5em 1em 0.5em 1em; border-width: 1px; border-color: black; border-style: solid; line-height: 100%; } H3 { font-size: 100%; font-family: Garamond, "Book Antiqua",Times,serif; background: #FFEE88; text-align: center; padding: 0.5em 1em 0.5em 1em; border-width: 1px; border-color: black; border-style: solid; } H4 { font-size: 75%; font-family: Garamond, "Book Antiqua",Times,serif; } H5 { font-size: 50%; font-family: Garamond, "Book Antiqua",Times,serif; } H6 { font-size: 25%; font-family: Garamond, "Book Antiqua",Times,serif; } A:link { font-weight: bold; color: #004000; text-decoration: underline; } A:visited { font-weight: bold; color: #008000; text-decoration: underline; } A:active { font-weight: bold; color: #800000; text-decoration: underline; } dt { font-size: medium; font-weight: bold; padding-top: 8px; padding-bottom: 8px; } dd { padding-top: 8px; padding-bottom: 8px; } </style> </head> <body bgcolor="#ffffff" text="#000000" link="#3300cc" vlink="#660066"> <!-- font tag for compat with non-CSS browsers --> <font face="lucida,verdana,sans-serif"> <div align="center"> <img src="images/WebMakeTitle.png" alt="WebMake" width="500" height="122" /> </div> <table width="100%"> <tr> <td valign="top"> <strong><a href="http://webmake.taint.org/">WebMake</a> Documentation</strong> (version 2.3) </td> <td valign="top"> <div align="right"> [ <a href="safe_tag.wmk.html">Back</a> | <a href="thumbnail_tag.wmk.html">Forward</a> | <a href="index.html">Index</a> | <a href="allinone.html">All In One</a> ] </div> </td> </tr> </table> <!-- yes, it's that Mozilla black-border code again ;) --> <!-- stolen from www.mozilla.org via rc3.org --> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td bgcolor="#aaaaaa"> <table border="0" cellspacing="4" cellpadding="4" width="100%"> <tr> <td bgcolor="#ffffff"> <table border="0" cellspacing="4" cellpadding="4" width="100%"> <tr> <td> <h1>sitetree.wmk</h1><a name="__index__"></a><!-- INDEX BEGIN --> <ul> <li> <a href="#loading">LOADING</a> </li> <li> <a href="#webmake tags">WEBMAKE TAGS</a> </li> <li> <a href="#description">DESCRIPTION</a> </li> <li> <a href="#attributes">ATTRIBUTES</a> </li> <li> <a href="#thanks">THANKS</a> </li> </ul> <!-- INDEX END --> <hr /> <h1><a name="loading">LOADING</a></h1><pre> <use plugin="sitetree" /></pre><hr /> <h1><a name="webmake tags">WEBMAKE TAGS</a></h1><pre> <sitetree name=... sitemap=... opennode=... closednode=... thispage=... leaf=... /></pre><hr /> <h1><a name="description">DESCRIPTION</a></h1><p> This WebMake Perl library provides the <code>sitetree</code> tag. </p> <p> <code>Sitetree</code> operates similarly to the built-in <a href="#item_sitemap"><code>sitemap</code></a> tag, but, displays only a subset of all the site's nodes; it will map all of the top-level nodes of the site, and then only the parent nodes of the current page. The effect is similar to a tree-view-based file browser, like Windows Explorer. </p> <p> In terms of differences in usage, where <a href="#item_sitemap"><code>sitemap</code></a> creates a single map which includes every page in the site, <code>sitetree</code> maps only the pages up to and including the current page, and generates a map for each individual output page. </p> <p> So, for a site like this: </p> <dl> <dt> <strong><a name="item_%2B_Section_1">+ Section 1</a></strong><br /> </dt> <dd> <dl> </dd> <dt> <strong><a name="item_%2B_Section_1_Subsection_1">+ Section 1 Subsection 1</a></strong><br /> </dt> <dd> </dd> <dt> <strong><a name="item_%2B_Section_1_Subsection_2">+ Section 1 Subsection 2</a></strong><br /> </dt> <dd> </dd> </dl> </dd> <dt> <strong><a name="item_%2B_Section_2">+ Section 2</a></strong><br /> </dt> <dd> <dl> </dd> <dt> <strong><a name="item_%2B_Section_2_Subsection_1">+ Section 2 Subsection 1</a></strong><br /> </dt> <dd> </dd> <dt> <strong><a name="item_%2B_Section_2_Subsection_2">+ Section 2 Subsection 2</a></strong><br /> </dt> <dd> </dd> </dl> </dl> <p> A reference to the site tree on page <code>Section 1 Subsection 1</code> would result in a site tree like this: </p> <dl> </dd> <dt> <strong><a name="item_%2D_Section_1">- Section 1</a></strong><br /> </dt> <dd> <dl> </dd> <dt> <strong><a name="item_%2D_Section_1_Subsection_1">- Section 1 Subsection 1</a></strong><br /> </dt> <dd> </dd> </dl> </dd> <dt> <strong>+ Section 2</strong><br /> </dt> <dd> </dd> </dl> <p> Display of each page's entry in the tree is performed by expanding one of the 4 template content items named in the tag's attributes: <a href="#item_closednode"><code>closednode</code></a>, <a href="#item_opennode"><code>opennode</code></a>, <a href="#item_thispage"><code>thispage</code></a>, or <a href="#item_leaf"><code>leaf</code></a>. See the <a href="#item_sitemap"><code>sitemap</code></a> tag documentation for more details on how to use these (note however that the <em>is_node</em> variable is not available for sitetrees). </p> <hr /> <h1><a name="attributes">ATTRIBUTES</a></h1><dl> </dd> <dt> <strong><a name="item_name">name</a></strong><br /> </dt> <dd> The name of the sitetree object. To include a sitetree in a page, refer to it using this name, as a deferred reference. </dd> <dt> <strong><a name="item_sitemap">sitemap</a></strong><br /> </dt> <dd> The name of the sitemap. The sitetree requires a sitemap, as the sitemap is responsible for mapping out the site and defining which pages and content items are included. </dd> <dt> <strong><a name="item_closednode">closednode</a></strong><br /> </dt> <dd> A content item which is evaluated to display a ''closed'' node, ie. a node which is not on the path to the current page. </dd> <dt> <strong><a name="item_opennode">opennode</a></strong><br /> </dt> <dd> A content item which is evaluated to display an ''open'' node, one which is on the path to the current page. As for the <a href="#item_sitemap"><code>sitemap</code></a> tag's <code>node</code> attribute, this content item must include a reference to the <strong>list</strong> variable, which will contain all the entries for the pages beneath it in the hierarchy. </dd> <dt> <strong><a name="item_thispage">thispage</a></strong><br /> </dt> <dd> A content item which is evaluated to display the current page. </dd> <dt> <strong><a name="item_leaf">leaf</a></strong><br /> </dt> <dd> A content item which is evaluated to display a leaf-node page, one which has no pages beneath it in the hierarchy. </dd> </dl> <hr /> <h1><a name="thanks">THANKS</a></h1><p> Thanks go to Alex Canady, who came up with the idea for this one. </p> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table width="100%"> <tr> <td valign="top"> <strong><a href="http://webmake.taint.org/">WebMake</a> Documentation</strong> (version 2.3) </td> <td valign="top"> <div align="right"> [ <a href="safe_tag.wmk.html">Back</a> | <a href="thumbnail_tag.wmk.html">Forward</a> | <a href="index.html">Index</a> | <a href="allinone.html">All In One</a> ] </div> </td> </tr> </table> <div align="right"> <a href="http://webmake.taint.org/"> <img src="images/BuiltWithWebMake.png" alt="Built With WebMake" border="0" width="88" height="31" /></a> </div> </font> </body> </html>