like in the docs I want to get a footer/content across all pages. I want the site root to be a shortcut to the first subpage, so I cannot use the created homepage node type in the site root. I want to store the footer in the first subpage (named “home”). TypoScript code looks like that:
After ./flow flow:cache:flush --force and ./flow node:repair --node-type TYPO3.Neos.NodeTypes:Page I get an exception in font- and backend at the place where I putted in the {footer -> f:format.raw()} in the html:
No content collection of type TYPO3.Neos:ContentCollection could be found in the current node and no node path was provided. You might want to configure the nodePath property with a relative path to the content collection.
landingPage<TYPO3.Neos:Page>/ body<TYPO3.TypoScript:Template>/ footer/ __meta/ context/ node<>/
At the context structure I can see the “Content Collection (footer)” only at this subpage (home). What I’m doing wrong? The docs say that I don’t have to store the footer in the site root.
I’ve exactly this snippet (almost equal to your snippet with @stolle’s comment applied) to render the footer which is maintained on a node named ‘en’ and it works fine. Can you match this with your current snippet?
What about find() vs children()@radmiraal? @itoop ‘footer’ is the name of your contenCollection, right? You migh’t try to access the node via children() or use the the identifier. The snippet would look like this:
You also might be able to fetch the first children below the site node with ${q(site).children('[instanceof TYPO3.Neos:Document]').first().children('footer')
Yeah, but find('footer') looks like the collection path, and the document with the site is missing. Can find skip some parts of the relative path? I think the correct path would be something like q(site).find('page1/footer')
I think so - because with footer = 'footer here' footer here appears in frontend (by the way I’m using {parts.footer -> f:format.raw()} to get it). And if I try it with the site root, it works.