*** empty log message ***
This commit is contained in:
parent
6e70501c8c
commit
9c63be7e9d
6 changed files with 26 additions and 39 deletions
|
|
@ -30,9 +30,9 @@ sub _replacement {
|
|||
sub _reversePageTree {
|
||||
my ($sth, @data, $output, $parentId);
|
||||
($parentId) = WebGUI::SQL->quickArray("select parentId from page where pageId='$_[0]'");
|
||||
$sth = WebGUI::SQL->read("select pageId,parentId,menuTitle,urlizedTitle from page where parentId=$_[0] order by sequenceNumber");
|
||||
$sth = WebGUI::SQL->read("select pageId,parentId,menuTitle,urlizedTitle,hideFromNavigation from page where parentId=$_[0] order by sequenceNumber");
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[0])) {
|
||||
if (!($data[4]) && WebGUI::Privilege::canViewPage($data[0])) {
|
||||
$output .= '<a class="verticalMenu" href="'.WebGUI::URL::gateway($data[3]).'">';
|
||||
if ($session{page}{pageId} == $data[0]) {
|
||||
$output .= '<span class="selectedMenuItem">'.$data[2].'</span>';
|
||||
|
|
|
|||
|
|
@ -12,41 +12,15 @@ package WebGUI::Macro::rootmenuHorizontal;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Navigation;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::URL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
my ($temp, @data, $pageTitle, $parentId, $sth, $first, @param, $delimeter);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
if ($param[0] eq "") {
|
||||
$delimeter = " · ";
|
||||
} else {
|
||||
$delimeter = " ".$param[0]." ";
|
||||
}
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$first = 1;
|
||||
$sth = WebGUI::SQL->read("select menuTitle,urlizedTitle,pageId from page where parentId=0
|
||||
and (pageId=1 or pageId>999) order by sequenceNumber");
|
||||
while (@data = $sth->array) {
|
||||
if (WebGUI::Privilege::canViewPage($data[2])) {
|
||||
if ($first) {
|
||||
$first = 0;
|
||||
} else {
|
||||
$temp .= $delimeter;
|
||||
}
|
||||
$temp .= '<a class="horizontalMenu" href="'.WebGUI::URL::gateway($data[1]).'">';
|
||||
if ($session{page}{pageId} == $data[2]) {
|
||||
$temp .= '<span class="selectedMenuItem">'.$data[0].'</span>';
|
||||
} else {
|
||||
$temp .= $data[0];
|
||||
}
|
||||
$temp .= '</a>';
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
my @param = WebGUI::Macro::getParams($_[0]);
|
||||
my $tree = WebGUI::Navigation::tree(0,1);
|
||||
my $temp = '<span class="horizontalMenu">';
|
||||
$temp .= WebGUI::Navigation::drawHorizontal($tree,$param[0]);
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue