-
-
Save sorenmalling/e58c3c36c5305f5802d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mypackage:link.node node="/sites/mysite/mypage">Click Me!</mypackage:link.node> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\Package\ViewHelpers\Link; | |
class NodeViewHelper extends \TYPO3\Neos\ViewHelpers\Link\NodeViewHelper { | |
public function render($node = NULL, $format = NULL, $absolute = false, array $arguments, $section = '', $addQueryString = false, array $argumentsToBeExcludedFromQueryString, $baseNodeName = 'documentNode', $nodeVariableName = 'linkedNode', $resolveShortcuts = TRUE) { | |
if (is_string($node) && $this->controllerContext->getRequest()->getInternalArgument('__documentNode')) { | |
$node = $this->controllerContext->getRequest()->getInternalArgument('__documentNode')->getNode($node); | |
} | |
return parent::render($node, $format, $absolute, $arguments, $section, $addQueryString, $argumentsToBeExcludedFromQueryString, $baseNodeName, $nodeVariableName, $resolveShortcuts); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment