The target node can be provided as string or as a Node object; if not specified at all, the generated URI will refer to the current document node inside the TypoScript context. When specifying the node argument as string, the following conventions apply: *node starts with /:* The given path is an absolute node path and is treated as such. Example: /sites/acmecom/home/about/us *node does not start with /:* The given path is treated as a path relative to the current node. Examples: given that the current node is /sites/acmecom/products/, stapler results in /sites/acmecom/products/stapler, ../about results in /sites/acmecom/about/, ./neos/info results in /sites/acmecom/products/neos/info. *node starts with a tilde character (~):* The given path is treated as a path relative to the current site node. Example: given that the current node is /sites/acmecom/products/, ~/about/us results in /sites/acmecom/about/us, ~ results in /sites/acmecom. = Examples = some link some link (depending on current node, format etc.) bookmark this page bookmark this page (depending on current workspace, current node, format, host etc.) Corporate imprint Corporate imprint (depending on current workspace, current node, format etc.) Corporate imprint Corporate imprint (depending on current workspace, current node, format etc.) About us About us (depending on current workspace, current node, format etc.) Imprint (depending on current workspace, current node, format etc.) see our {linkedNode.label} page see our About Us page (depending on current workspace, current node, format etc.)
Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractTagBasedViewHelper, use trait Neos\Fusion\ViewHelpers\TypoScriptContextTrait
 /**
  * @test
  */
 public function viewHelperAssignsLinkedNodeToNodeVariableName()
 {
     $templateVariableContainer = new TemplateVariableContainer(array());
     $this->inject($this->viewHelper, 'templateVariableContainer', $templateVariableContainer);
     $this->viewHelper->setRenderChildrenClosure(function () use($templateVariableContainer) {
         return $templateVariableContainer->get('alternativeLinkedNode')->getLabel();
     });
     $this->assertSame('<a href="/en/home.html">Home</a>', $this->viewHelper->render('/sites/example/home@live', null, false, array(), '', false, array(), 'documentNode', 'alternativeLinkedNode'));
 }