Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Commit

Permalink
TASK: Add node prop for editable component
Browse files Browse the repository at this point in the history
With this it's possible  to specify the edited node as part of the editable API, instead than over the context - while the latter is still the default behavior.
  • Loading branch information
grebaldi authored Jun 30, 2017
1 parent d476f5f commit 7716b17
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Resources/Private/Fusion/Prototypes/Editable.fusion
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
prototype(PackageFactory.AtomicFusion:Editable) < prototype(PackageFactory.AtomicFusion:Component) {
node = ${node}
property = null
block = true

renderer = Neos.Fusion:Case {
editable {
condition = ${node.context.inBackend && node.context.currentRenderingMode.edit}
condition = ${props.node.context.inBackend && props.node.context.currentRenderingMode.edit}
renderer = Neos.Fusion:Tag {
tagName = ${props.block ? 'div' : 'span'}
content = ${q(node).property(props.property)}
content = ${q(props.node).property(props.property)}
@process.contentElementEditableWrapping = Neos.Neos:ContentElementEditable {
property = ${props.property}
}
Expand All @@ -17,7 +18,7 @@ prototype(PackageFactory.AtomicFusion:Editable) < prototype(PackageFactory.Atomi

notEditable {
condition = true
renderer = ${q(node).property(props.property)}
renderer = ${q(props.node).property(props.property)}
}
}
}

0 comments on commit 7716b17

Please sign in to comment.