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:
parent
4d27b10457
commit
9f69e54e77
2 changed files with 4 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
7.5.20
|
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
|
7.5.19
|
||||||
- fixed: paginator doesn't show correct number of page links with a limit applied
|
- fixed: paginator doesn't show correct number of page links with a limit applied
|
||||||
|
|
|
||||||
|
|
@ -401,6 +401,7 @@ sub view {
|
||||||
my $currentLineage = $current->get("lineage");
|
my $currentLineage = $current->get("lineage");
|
||||||
my $lineageToSkip = "noskip";
|
my $lineageToSkip = "noskip";
|
||||||
my $absoluteDepthOfLastPage;
|
my $absoluteDepthOfLastPage;
|
||||||
|
my $absoluteDepthOfFirstPage = $assets->[0]->getLineageLength;
|
||||||
my %lastChildren;
|
my %lastChildren;
|
||||||
my $previousPageData = undef;
|
my $previousPageData = undef;
|
||||||
my $eh = $self->session->errorHandler;
|
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.isContainer'} = isIn($asset->get('className'), @{$self->session->config->get("assetContainers") || []});
|
||||||
$pageData->{'page.isUtility'} = isIn($asset->get('className'), @{$self->session->config->get("utilityAssets") || []});
|
$pageData->{'page.isUtility'} = isIn($asset->get('className'), @{$self->session->config->get("utilityAssets") || []});
|
||||||
$pageData->{"page.url"} = $asset->getUrl;
|
$pageData->{"page.url"} = $asset->getUrl;
|
||||||
my $indent = $pageData->{"page.relDepth"};
|
my $indent = $asset->getLineageLength - $absoluteDepthOfFirstPage;
|
||||||
$pageData->{"page.indent_loop"} = [];
|
$pageData->{"page.indent_loop"} = [];
|
||||||
push(@{$pageData->{"page.indent_loop"}},{'indent'=>$_}) for(1..$indent);
|
push(@{$pageData->{"page.indent_loop"}},{'indent'=>$_}) for(1..$indent);
|
||||||
$pageData->{"page.indent"} = " " x $indent;
|
$pageData->{"page.indent"} = " " x $indent;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue