Fix a problem where an unviewable initial asset would throw off the indent_loop
size by 1. In the nav templates, this would generate bad closing markup.
This commit is contained in:
parent
70a5299114
commit
436ca52676
2 changed files with 8 additions and 4 deletions
|
|
@ -405,10 +405,6 @@ sub view {
|
|||
my $previousPageData = undef;
|
||||
my $eh = $self->session->errorHandler;
|
||||
foreach my $asset (@{$assets}) {
|
||||
# Set absoluteDepthOfFirstPage
|
||||
if ( !defined $absoluteDepthOfFirstPage ) {
|
||||
$absoluteDepthOfFirstPage = $asset->getLineageLength;
|
||||
}
|
||||
|
||||
# skip pages we shouldn't see
|
||||
my $pageLineage = $asset->get("lineage");
|
||||
|
|
@ -426,6 +422,13 @@ sub view {
|
|||
$lineageToSkip = $pageLineage unless ($pageLineage eq "000001");
|
||||
next;
|
||||
}
|
||||
|
||||
# Set absoluteDepthOfFirstPage after we have determined if the first page is viewable!
|
||||
# Otherwise, the indent loop calculation below will be off by 1 (or more)
|
||||
if ( !defined $absoluteDepthOfFirstPage ) {
|
||||
$absoluteDepthOfFirstPage = $asset->getLineageLength;
|
||||
}
|
||||
|
||||
my $pageData = {};
|
||||
my $pageProperties = $asset->get;
|
||||
while (my ($property, $propertyValue) = each %{ $pageProperties }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue