A simple question. Somehow I couldn’t find the answer in the documentation.
How can I write this dynamically?
<a href="/de/hauptseite.html">Zurück</a>
A simple question. Somehow I couldn’t find the answer in the documentation.
How can I write this dynamically?
<a href="/de/hauptseite.html">Zurück</a>
Get the parent document by ${q(node).parent('[instanceof Neos.Neos:Document]')
would be the first answer that comes to my mind
I assume this is about a Content Element in Neos?!
In this case you can get the parent node via Fusion like Søren wrote and pass it to the view like
parentNode = ${q(documentNode).parent().get(0)}
wrote and then use the Link.NodeViewHelper
:
{namespace neos=Neos\Neos\ViewHelpers}
<neos:link.node node="{parentNode}">Zurück</neos:link.node>
Thank you @bwaidelich for this detailed answer! That’s exactly what I was looking for!