[Neos] Link to root page
Robert Lemke
robert at typo3.org
Fri Jan 30 00:06:13 CET 2015
Hi,
> On 29 Jan 2015, at 23:02, sim_co <sim_co at gazeta.pl> wrote:
>
> I just started my adventure with TYPO3 NEOS.
> I'm trying to link an image to root (home) page.
>
> Finally I have done it, but is there simpler solution?
>
> Root.ts2:
>
> ..
> homeLink = ${q(node).parents().last().property('_path')}
>
> Default.html
>
> <neos:link.node node="{parts.homeLink -> f:format.raw()}"> IMAGE </neos:link.node>
The easiest way is probably to specify the node path directly:
<neos:link.node node="/sites/neosdemotypo3org"> IMAGE </neos:link.node>
Alternatively you can specify the node object instead of the path:
homeLink = ${q(node).find('/sites/neosdemotypo3org').get()}
…
<neos:link.node node="{homeLink}"> IMAGE </neos:link.node>
Or simply
<neos:link.node node="{site}"> IMAGE </neos:link.node>
I didn't test any of these examples (too late here ...), so please give a quick feedback which one worked out for you.
Cheers,
Robert
More information about the Neos
mailing list