Skip to content

Commit

Permalink
TASK: Adjust usage of hiddenInIndex to use hiddenInMenu
Browse files Browse the repository at this point in the history
The internal property `hiddenInIndex` was renamed to `hiddenInMenu`. To match this renaming the fusion property `renderHiddenInIndex` is renamed to `renderHiddenInMenu`.

Needs: neos/neos-development-collection#4921
  • Loading branch information
ahaeslich committed Mar 10, 2024
1 parent 8873dc1 commit 12b6d41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions Classes/Fusion/XmlSitemapUrlsImplementation.php
Expand Up @@ -42,7 +42,7 @@ class XmlSitemapUrlsImplementation extends AbstractFusionObject
*/
protected array $assetPropertiesByNodeType = [];

protected ?bool $renderHiddenInIndex = null;
protected ?bool $renderHiddenInMenu = null;

protected ?bool $includeImageUrls = null;

Expand All @@ -62,13 +62,13 @@ public function getIncludeImageUrls(): bool
return $this->includeImageUrls;
}

public function getRenderHiddenInIndex(): bool
public function getRenderHiddenInMenu(): bool
{
if ($this->renderHiddenInIndex === null) {
$this->renderHiddenInIndex = (boolean)$this->fusionValue('renderHiddenInIndex');
if ($this->renderHiddenInMenu === null) {
$this->renderHiddenInMenu = (boolean)$this->fusionValue('renderHiddenInMenu');
}

return $this->renderHiddenInIndex;
return $this->renderHiddenInMenu;
}

/**
Expand Down Expand Up @@ -214,13 +214,13 @@ protected function resolveImages(Subtree $subtree, array &$item): void
}

/**
* Return TRUE/FALSE if the node is currently hidden; taking the "renderHiddenInIndex" configuration
* Return TRUE/FALSE if the node is currently hidden; taking the "renderHiddenInMenu" configuration
* of the Menu Fusion object into account.
*/
protected function isDocumentNodeToBeIndexed(Node $node): bool
{
return !$this->getNodeType($node)->isOfType('Neos.Seo:NoindexMixin')
&& ($this->getRenderHiddenInIndex() || $node->getProperty('hiddenInIndex') !== true)
&& ($this->getRenderHiddenInMenu() || $node->getProperty('hiddenInMenu') !== true)
&& $node->getProperty('metaRobotsNoindex') !== true
&& (
(string)$node->getProperty('canonicalLink') === ''
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Helper/SitemapUrls.fusion
Expand Up @@ -2,5 +2,5 @@ prototype(Neos.Seo:Helper.SitemapUrls) {
@class = 'Neos\\Seo\\Fusion\\XmlSitemapUrlsImplementation'
startingPoint = null
includeImageUrls = false
renderHiddenInIndex = true
renderHiddenInMenu = true
}

0 comments on commit 12b6d41

Please sign in to comment.