Wiki source for OnegWRTree

Show raw source

===== Tree Action =====
>>==See Also==
~- WikkaBugsResolved - Original ""ExistsPage"" function by JavaWoman
~- WikkaOptimization - Faster cached version by IanAndolina
~- HierarchiesAndInheritance > CategorySystemOverhaul
>>//NOT Included in any Wikka version yet//{{lastedit}}
~- Finds pages within the current page name and builds a menu with it.
~- If you add sub-pages by adding a string to the parent page name (e.g. ""OnegWRTree"" is the sub-page ""Tree"" of the parent-page ""OnegWR"") you can loop trough the string and check if this string within the page name is a page on it's own...
~~ e.g. HomePage > OnegWR > OnegWRTree

~- Include on the page where you would like to include this little menu the string:

~- Save the code below as ##action/tree.php##
~- Give it the same file permissions as the other php files in that directory.
~- Note: function ""ExistsPage"" is included in

// Display a 'tree' of parent-pages by OnegWR
// e.g. OnegWR > OnegWRactions > OnegWRactionsTree
$max = strlen($this->tag);
$treepage .= $this->tag{$i};
if( $this->ExistsPage($treepage) ){
$treelink .= " > ";
$treelink .= $this->Link($treepage);
print $treelink;
~- Published on main site (2005-05-09) - OnegWR

==To Do==
~- Add switch: start at root_page or not?
~- Add switch: Reverse, print menu right to left
~- Add css tags

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki