[Neos] Getting link path from reference property

Lars Nieuwenhuizen lars.nieuwenhuizen at me.com
Tue Jan 6 12:08:29 CET 2015


Hi Tina,

When you use the reference type you only get the reference to the node you specified in Neos not the direct link.
To actually link to the node you’ll have to use the Neos link viewHelper.

add in the (top of the) template {namespace neos=TYPO3\Neos\ViewHelpers}
Then you can link to the node:

<neos:link.node node=“{terminalLink}”>My link text</neos:link.node>

Hope this helps.

Lars

> Op 6 jan. 2015, om 10:39 heeft Tina Eckhorst <t.eckhorst at magent.de> het volgende geschreven:
> 
> Hi,
> 
> in the NodeTypes.yaml file I defined a link property:
> terminLink:
> type: reference
> ui:
>   label: 'Link'
> 
> How do I get the correct relative path in the template?
> When I tried {terminLink.path} the output in the template is "/sites/sitename/info/leistungen" but it should be "/info/leistungen.html".
> _______________________________________________
> Neos mailing list
> Neos at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/neos



More information about the Neos mailing list