Skip to content

Commit

Permalink
BUGFIX: Render dimension menu only when context node is found
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Aug 10, 2020
1 parent 9098d2f commit d134170
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/ViewHelpers/DimensionInformationViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class DimensionInformationViewHelper extends AbstractViewHelper
{

/**
* Initialize arguments.
*
Expand All @@ -16,10 +16,10 @@ class DimensionInformationViewHelper extends AbstractViewHelper
*/
public function initializeArguments()
{
$this->registerArgument('node', NodeInterface::class, 'Node', false);
$this->registerArgument('node', NodeInterface::class, 'Node', true);
$this->registerArgument('dimension', 'string', 'Dimension', false, null);
}

/**
* @param NodeInterface $node
* @param string $dimension dimension name
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Partials/LanguageSelection.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{namespace neos=Neos\Neos\ViewHelpers}
{namespace taxonomy=Sitegeist\Taxonomy\ViewHelpers}

<f:if condition="{contextNode}">
<f:form action="changeContext" class="neos-inline" method="get">

<f:form.hidden name="contextNode" value="{contextNode.contextPath}" />
Expand All @@ -13,3 +14,4 @@
</f:for>

</f:form>
</f:if>

0 comments on commit d134170

Please sign in to comment.