Open jimblue opened 11 months ago
Does this work at all?
{{ gallery_images scope="image" }}
{{ partial:common/components/image :image="image" }}
{{ /gallery_images }}
Actually, it's possible to do:
{{ gallery_images }}
{{ partial:common/components/image :image="gallery_images[index]" }}
{{ /gallery_images }}
Thanks @edalzell !
But I still think it could be a good idea to use {{ value }}
to respect use same nomenclature as array.
Does this work at all?
{{ gallery_images scope="image" }} {{ partial:common/components/image :image="image" }} {{ /gallery_images }}
Just tried and indeed its working !
This is a little cleaner than using the index
thank you. 🙏🏼
But I still think that using the same predictable usage for array and assets by giving access to a {{ value }}
field would be nicer 😺
Hello gentlement !
To explain my point the best is a simple exemple so here it is.
For a
gallery_images
Asset Fieldtype that returns an array of assets I have the following template:Now I want to use an Antlers "component" to create the image:
This is working but it's far from ideal as I have to declare every single arguments (there is a lot more of them ...) It could be so much simpler if we could pass the image Asset object like so:
I've use a
{{ value }}
tag in the example to follow the same nomenclature used in array.