[Neos] Put Text node as direct child on page
Reinis Zumbergs
reinis.zumbergs at gmail.com
Tue Jan 27 13:40:14 CET 2015
Cool! I have it working .. (almost - see "However.." below)
The issue was different, but the solution was in the file you linked to.
I had TS2 line wrong. It should have been
@override.node = ${q(site).children('headerLink1').get(0)}
instead of
node = ${q(site).children('headerLink1')}
(Maybe someone can explain why my original line is wrong?)
So working code is like this
-- Configuration/NodeTypes.yaml --
'TYPO3.Neos.NodeTypes:Page':
childNodes:
headerLink1:
type: 'TYPO3.Neos.NodeTypes:Text'
-- Resources/Private/TypoScript/Root.ts2 --
page.body.parts {
headerLink1 = TYPO3.Neos.NodeTypes:Text {
@override.node = ${q(site).children('headerLink1').get(0)}
}
}
-- Resources/Private/Templates/Page/Default.html --
..
<div class="header-link">
{parts.headerLink1 -> f:format.raw()}
</div>
..
However, changes to the Text node behave strangely
- I make a change. If in inspector, hit Apply
- If in inspector, reload is triggered. Sometimes it reflects the change that I just did, sometimes not (but it doesn't affect further steps)
- I hit Publish. Success, but when I reload frontend, the change is not there
- Now, I make change to any page (fx change title) and Apply (don't have to publish) and the change goes live!
- What? :)
Maybe someone can replicate this? I'll gladly make a bug reports if it's a bug.
More information about the Neos
mailing list