Hi!
I am currently working on a NEOS site where I need to output some nodes on a page that are stored on other pages.
For example if I want to output the first headline found in the site
node of my page, I would define the following in the page’s fusion template:
prototype(Some.Package:Page) < prototype(Neos.Neos:Page) {
body {
templatePath = 'resource://Some.Package/Private/Templates/Page/Page.html'
sectionName = 'body'
firstHeadline = ${q(site).find('[instanceof Some.Package:Headline]').first().get(0)}
}
}
Page.html template:
{namespace neos=Neos\Neos\ViewHelpers}
<f:section name="body">
<f:render section="headline" arguments="{headline: firstHeadline, title: firstHeadline.properties.title}" />
</f:section>
<f:section name="headline">
<neos:contentElement.wrap node="{headline}">
{neos:contentElement.editable(property: 'title')}
</neos:contentElement.wrap>
</f:section>
Let’s pretend the first headline found is stored at the page /sites/home/subpage-1
and we want to render it on the page /sites/home/subpage-1/subpage-2
.
With the templates above, the headline from subpage-1 is rendered on subpage-2 and can be inline edited.
The problem is that when editing the headline on subpage-2 the node value for the title property is changed on the headline itself, which is stored on subpage-1, but when subpage-2 is reloaded in the backend, the old value of the headline is displayed.
The only way I have found to update the headline value on subpage-2 is via a full cache clear.
Is this a bug in NEOS, or is my implementation wrong?
Thanks in adavance!