Skip to content

Commit

Permalink
[FIX] node context
Browse files Browse the repository at this point in the history
asset is not properly set if the node is modified via context,
because the order of evaluation in context cant be influenced.
  • Loading branch information
htuscher authored Apr 28, 2017
1 parent 16605d0 commit fc26b02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ prototype(Neos.NodeTypes:Image) {
templatePath = 'resource://Onedrop.ImageSrcset/Private/Templates/NodeTypes/Image.html'

@context.config = ${Configuration.setting('Onedrop.ImageSrcset')}
@context.asset = ${q(node).property('image')}
@context.maximumWidth = ${this.maximumWidth}

srcset = Neos.Fusion:Collection {
collection = ${config.sizes}
itemName = 'size'
itemRenderer = Neos.Neos:ImageUri {
asset = ${asset}
asset = ${q(node).property('image')}
maximumWidth = ${size}
maximumHeight = ${size}
@process.wrapSrc = ${(size <= maximumWidth ? (value + ' ' + size + 'w' + (iterator.isLast ? '' : ', ')) : '')}
Expand Down

0 comments on commit fc26b02

Please sign in to comment.