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

Commit

Permalink
Merge pull request #9 from PackageFactory/task/editable-node-prop
Browse files Browse the repository at this point in the history
TASK: Add node prop for editable component
  • Loading branch information
grebaldi authored Jun 30, 2017
2 parents d476f5f + 7716b17 commit d0dafbd
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 d0dafbd

Please sign in to comment.