Skip to content

Commit

Permalink
TASK: Use Neos.Fusion:Loop instead of deprecated `Neos.Fusion:Colle…
Browse files Browse the repository at this point in the history
…ction`

`Neos.Fusion:Collection` will be removed with Neos 9
  • Loading branch information
ahaeslich committed Oct 14, 2023
1 parent c3703e3 commit 9822628
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Resources/Private/Fusion/Prototypes/DummyImageSource.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ prototype(Sitegeist.Kaleidoscope:DummyImageSource) {
// <table>
// <thead>
// <th></th>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="width" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="width" @children="itemRenderer">
// <th>W {width}</th>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </thead>
// <tbody>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="height" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="height" @children="itemRenderer">
// <tr>
// <th>H {height}</th>
// <Neos.Fusion:Collection collection={props.dimensions} itemName="width" @children="itemRenderer">
// <Neos.Fusion:Loop items={props.dimensions} itemName="width" @children="itemRenderer">
// <td>
// <img src={props.imageSource.setWidth(width).setHeight(height)} width={width} height={height} />
// </td>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </tr>
// </Neos.Fusion:Collection>
// </Neos.Fusion:Loop>
// </tbody>
// </table>
// `
Expand Down
10 changes: 5 additions & 5 deletions Resources/Private/Fusion/Prototypes/Picture.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
renderer = afx`
<picture class={props.class} {...props.attributes}>
{props.content}
<Neos.Fusion:Collection collection={props.sources} itemName="source" @if.has={props.sources}>
<Neos.Fusion:Loop items={props.sources} itemName="source" @if.has={props.sources}>
<Sitegeist.Kaleidoscope:Source
imageSource={source.imageSource ? source.imageSource : props.imageSource}
type={source.type}
Expand All @@ -115,17 +115,17 @@ prototype(Sitegeist.Kaleidoscope:Picture) < prototype(Neos.Fusion:Component) {
sizes={source.sizes ? source.sizes : props.sizes}
renderDimensionAttributes={props.renderDimensionAttributes}
/>
</Neos.Fusion:Collection>
<Neos.Fusion:Collection
</Neos.Fusion:Loop>
<Neos.Fusion:Loop
@if.has={props.imageSource && props.formats}
collection={Type.isArray(props.formats) ? props.formats : String.split(props.formats, ',')}
items={Type.isArray(props.formats) ? props.formats : String.split(props.formats, ',')}
itemName="format"
>
<Sitegeist.Kaleidoscope:Source
imageSource={props.imageSource}
format={String.trim(format)}
/>
</Neos.Fusion:Collection>
</Neos.Fusion:Loop>
<Sitegeist.Kaleidoscope:Image
imageSource={props.imageSource}
sizes={props.sizes}
Expand Down

0 comments on commit 9822628

Please sign in to comment.