From a38817feec061fb59f21c823302b9cf66c96acbe Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 30 Mar 2005 04:58:38 +0000 Subject: [PATCH] added new variables to the Navigation Template --- lib/WebGUI/Asset/Wobject/Navigation.pm | 7 +++++++ lib/WebGUI/i18n/English/Navigation.pm | 3 +++ 2 files changed, 10 insertions(+) diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm index 88f74ffe8..7e78db640 100644 --- a/lib/WebGUI/Asset/Wobject/Navigation.pm +++ b/lib/WebGUI/Asset/Wobject/Navigation.pm @@ -365,6 +365,13 @@ sub view { } $absoluteDepthOfLastPage = $pageData->{"page.absDepth"}; $pageData->{"page.hasChild"} = $asset->hasChildren; + ++$var->{"currentPage.hasSibling"} + if $pageData->{"page.isSibling"}; + ++$var->{"currentPage.hasViewableSiblings"} + if ($pageData->{"page.isSibling"} && $pageData->{"isViewable"}); + ++$var->{"currentPage.hasViewableChildren"} + if ($pageData->{"page.isChild"} && $pageData->{"isViewable"}); + my $parent = $asset->getParent; if (defined $parent) { foreach my $property (@interestingProperties) { diff --git a/lib/WebGUI/i18n/English/Navigation.pm b/lib/WebGUI/i18n/English/Navigation.pm index 4a5f47aef..99631ceed 100644 --- a/lib/WebGUI/i18n/English/Navigation.pm +++ b/lib/WebGUI/i18n/English/Navigation.pm @@ -89,6 +89,9 @@ the Navigation Template to determine who can see them in the menu.

currentPage.newWindow
A conditional indicating whether the base page should be opened in a new window.

currentPage.hasChild
A conditional indicating whether the base page has daughters.

currentPage.isHome
A conditional indicating whether the base page is the default page for the site.

+

currentPage.hasSibling
A conditional indicating whether the base page has siblings.

+

currentPage.hasViewableSiblings
A conditional indicating whether the base page has siblings that are viewable by the current user.

+

currentPage.hasViewableChildren
A conditional indicating whether the base page has children that are viewable by the current user.

page_loop
A loop containing page information in nested, hierarchical order.

unfolded_page_loop
This loop contains the same data as page_loop but the order is different. unfolded_page_loop returns it's pages in an unfolded manner; grouped by parent id. You'll probably need page_loop, but there are (CSS) menus that need unfolded_page_loop to work properly.

Both page_loop and unfolded_page_loop have the following