Skip to content

Instantly share code, notes, and snippets.

@htuscher
Created February 10, 2017 14:31
Show Gist options
  • Save htuscher/fee808612c12c74b48906e0fa7238102 to your computer and use it in GitHub Desktop.
Save htuscher/fee808612c12c74b48906e0fa7238102 to your computer and use it in GitHub Desktop.
Neos Conditional inherited ContentCollection
---
'Onedrop.Demo:InheritFooterMixin':
abstract: true
childNodes:
sidebar:
type: 'TYPO3.Neos:ContentCollection'
properties:
inheritSidebar:
type: boolean
defaultValue: true
ui:
label: 'Inherit sidebar from nearest parent'
reloadIfChanged: true
inspector:
group: document
sidebar = TYPO3.Neos:ContentCollection {
nodePath = 'sidebar'
@context.node = ${q(node).property('inheritSidebar') ? Neos.Node.nearestContentCollection(site, this.nodePath) : Neos.Node.nearestContentCollection(node, this.nodePath)}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment