Skip to content

Commit

Permalink
fixed uri rendering condition
Browse files Browse the repository at this point in the history
  • Loading branch information
breadlesscode committed Feb 20, 2018
1 parent 86ec7b1 commit 8f48c41
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Classes/Package/FrontendNodeRoutePartHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ protected function findNextNodeWithPathSegmentRecursively(
array_unshift($relativeNodePathSegments, $node->getName());
return $foundNode;
}
}
if ($node->getProperty('uriPathSegment') === $pathSegment) {
} elseif ($node->getProperty('uriPathSegment') === $pathSegment) {
$relativeNodePathSegments[] = $node->getName();
return $node;
}
Expand Down Expand Up @@ -115,7 +114,7 @@ protected function getRequestPathByNode(NodeInterface $node)
);
}

if ($startingNode === $node || $this->shouldHideNodeUriSegement($node)) {
if ($startingNode === $node || !$this->shouldHideNodeUriSegement($node)) {
$pathSegment = $node->getProperty('uriPathSegment');
$requestPathSegments[] = $pathSegment;
}
Expand All @@ -135,7 +134,7 @@ protected function getRequestPathByNode(NodeInterface $node)
protected function shouldHideNodeUriSegement(NodeInterface $node)
{
return
!$node->hasProperty(self::MIXIN_PROPERTY_NAME) ||
!$node->getProperty(self::MIXIN_PROPERTY_NAME) === true;
$node->hasProperty(self::MIXIN_PROPERTY_NAME) &&
$node->getProperty(self::MIXIN_PROPERTY_NAME) === true;
}
}

0 comments on commit 8f48c41

Please sign in to comment.