[SOLVED] Uri resource to parent path

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>
1 Like

Thank you @bwaidelich for this detailed answer! That’s exactly what I was looking for!