Fixed bug in Navigation where the indent was based on relDepth rather that on the tree depth. Also fixes issues

concerning the <ul> template.
This commit is contained in:
Martin Kamerbeek 2008-08-08 09:53:33 +00:00
parent 4d27b10457
commit 9f69e54e77
2 changed files with 4 additions and 1 deletions

View file

@ -1,4 +1,6 @@
7.5.20
- fixed: The indent loop of the Navigation wobject has an incorrect number of
iterations in some cases. (Martin Kamerbeek / Oqapi)
7.5.19
- fixed: paginator doesn't show correct number of page links with a limit applied

View file

@ -401,6 +401,7 @@ sub view {
my $currentLineage = $current->get("lineage");
my $lineageToSkip = "noskip";
my $absoluteDepthOfLastPage;
my $absoluteDepthOfFirstPage = $assets->[0]->getLineageLength;
my %lastChildren;
my $previousPageData = undef;
my $eh = $self->session->errorHandler;
@ -437,7 +438,7 @@ sub view {
$pageData->{'page.isContainer'} = isIn($asset->get('className'), @{$self->session->config->get("assetContainers") || []});
$pageData->{'page.isUtility'} = isIn($asset->get('className'), @{$self->session->config->get("utilityAssets") || []});
$pageData->{"page.url"} = $asset->getUrl;
my $indent = $pageData->{"page.relDepth"};
my $indent = $asset->getLineageLength - $absoluteDepthOfFirstPage;
$pageData->{"page.indent_loop"} = [];
push(@{$pageData->{"page.indent_loop"}},{'indent'=>$_}) for(1..$indent);
$pageData->{"page.indent"} = "&nbsp;&nbsp;&nbsp;" x $indent;