[Neos] Problem with Content Collection

nikos nick at jamalade.com
Fri Sep 5 11:29:45 CEST 2014


Hi

Assuming it all worked before you added the collection and in  NodeTypes.yaml the indents and correct ie. 2 spaces then it looks alright to me. Have 
you tried flushing the cache though?

I am not sure what you mean by inheriting the contentcollection in subpages, but if you create a Page "sub page" of a Page Node then it will have that 
new ContentCollection.

Alternatively if you want to create a subtype of Page that is easy to do eg.

In NodeTypes

'YourSite.Blah:SubPage':
   superTypes:
     - 'TYPO3.Neos.NodeTypes:Page'
   ui:
     label: 'Sub Page'
     icon: 'icon-book'
     inspector:
       groups:
         'document':
           label: 'Sub Page'
   properties:
     ...

Cheers

Niko


On 05/09/2014 08:30, Karlheinz Eckhart wrote:
> Hi everybody,
>
> im using Typo3 Neos 1.1.2 (upgraded from 1.1.0). I'm trying to create my own Content Collection "headers". Reading the docu and forum i can't find an
> error, maybe someone an idea?
>
> [1]
> NodeTypes.yaml
> 'TYPO3.Neos.NodeTypes:Page':
>   childNodes:
>     'headers':
>       type: 'TYPO3.Neos:ContentCollection'
>
> [2]
> /flow node:autocreatechildnodes --node-type TYPO3.Neos.NodeTypes:Page
>
> Working on node type "TYPO3.Neos.NodeTypes:Page" ...
> Auto created node named "headers" in "/sites/bergfrieden"
> Auto created node named "headers" in "/sites/bergfrieden/zimmer-appartements"
> Auto created node named "headers" in "/sites/bergfrieden/preise"
> Auto created node named "headers" in "/sites/bergfrieden/winterurlaub"
> Auto created node named "headers" in "/sites/bergfrieden/Sommer"
> Auto created node named "headers" in "/sites/bergfrieden/Service/anreise"
> Auto created node named "headers" in "/sites/bergfrieden/Service/bewertungen"
> Auto created node named "headers" in "/sites/bergfrieden/Service/impressum"
> Auto created node named "headers" in "/sites/bergfrieden/Service/sitemap"
> Created 9 new child nodes
>
> [3]
> Root.ts2
>
> ..
>          content {
>              teaser = ContentCollection {
>                  nodePath = 'teaser'
>              }
>
>              // Default content section
>              main = PrimaryContent {
>                  nodePath = 'main'
>              }
>
>                         headers = ContentCollection {
>                                 nodePath = 'headers'
>                         }
>          }
> ..
>
> [4]
> Default.html
>             <div class="row">
>                 <div class="col-lg-12 text-center">
>                     {content.headers -> f:format.raw()}
>                 </div>
>             </div>
>
> Unfortunatly, it doesn't work. I read many threads, that described it this way.
> By the way, is there a possibility to inherit the content from my new ContentCollection to subpages, as it worked on Typo3 CMS?
>
> thanks for your help!
>
> karlheinz



More information about the Neos mailing list