Hi, I need help to understand how I can get collection items to be able to get data without placing collection into the structure.
The problem is that I have set the collection gem
and each gem has an image gallery. On homepage is shown latest gem from the artist with description, and two images. The first image will be on top and second on the side next to the description. For now, I have set the first image as cover a and second should be the second image from the gallery. (at this moment there is full image gallery)
I have tried to place collections to structure btw. item gallery
need to be nested collection as is not accessible from the original collection. This makes my life harder, anyway, as embed code from the nested collection doesn’t have access to variables created in embed from the parent collection. It makes my life even harder. So I have decided that the best way will be to grab collection to be able to work with collection items and their data. Store them to variables and use them (render) in places I need.
I know that is a long explanation but I want to make it as clear as possible.
Questions
1. Is there a way I can grab collection based on its ID and store it in a variable?
– If yes can someone post a snippet or image with an example?
2. Is there a way how to link embedHTML
on the same page be able to share or access variables from each other? (top-bottom)?
Here is a collection ID if someone will need it for tests
COLLECTION ID: 5f7ae0fdc6adaf11ac0d8454
Thanks for any advice, tip for publication with examples in detail how it works as I didn’t found proper documentation (if I have missed some advanced sources please share it)
PS: styling is not done, I need functionality first
Here is my site Read-Only: VISIT PAGE
(how to share your site Read-Only link)