[Neos] Re: Put Text node as direct child on page
Bernhard Aster
bernhard.aster at arrabiata.de
Fri Mar 6 12:17:03 CET 2015
Hey Dmitri,
it's no rocket science but at any begin sometimes people like you are needed to get hints to understand. ;-)
Thanks for helping, the links and your effort!
Best
Bernhard
Quote: Bernhard Aster (baster) wrote on Fri, 06 March 2015 10:04
----------------------------------------------------
> Hi Dmitri,
>
> thanks for your hint.
> Now it's working.
>
>
> page.content.teaser = TYPO3.Neos.NodeTypes:Text {
> @override.node = ${q(documentNode).children('teaser').get(0)}
> }
>
> "Why nodePath?"
> I simply copied the page.content.main part and changed the type from PrimeryContent to TYPO3.Neos.NodeTypes:Text.
>
> page.content.main = PrimaryContent {
> nodePath = 'main'
> }
>
> I thought with nodePath="teaser" i define the nodePath to "teaser" in the current context of a page node. Like "main" area.
>
> A.T.M i don't got it at all why @override.node works. But i will study that.
>
> Thanks anyway
> Best Bernhard
>
> Quote: Reinis Zumbergs (reinis-zumbergs) wrote on Mon, 26 January 2015 12:30
> ----------------------------------------------------
> > Hello, all, my first post here!
> >
> > We all know how to put ContentCollection on the page:
> > - add new childnode in NodeTypes.yaml
> > - add ContentCollection sub-path to body parts in Root.ts2
> >
> > But I would like to put TYPO3.Neos.NodeTypes:Text directly on page. I tried various approaches including:
> > NodeTypes.yaml
> > 'TYPO3.Neos.NodeTypes:Page':
> > childNodes:
> > headerLink1:
> > type: 'TYPO3.Neos.NodeTypes:Text'
> >
> > Root.ts2
> > page.body {
> > // Frontpage header links
> > headerLink1 = TYPO3.Neos.NodeTypes:Text {
> > node = ${q(site).children('headerLink1')}
> > }
> > }
> >
> > But no success.
> > The editable area in BE is created and the Text node is present in page structure, but when it tries to save changes, an error occurs saying:
> > Node type "TYPO3.Neos.NodeTypes:Page" does not have a property "text" according to the schema.
> >
> > Another approach to somewhat achieve what I need would be to be able to limit ContentCollection to have only one child - no possibility to add more content nodes to the collection.
> >
> >
> ----------------------------------------------------
>
>
----------------------------------------------------
More information about the Neos
mailing list