This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Dániel Korpai
Posted Apr 06 - Read on Facebook

Hey :)

I've started to work more heavily with for-loop, but got really stuck at a point.

I created 4 cards with a for-loop and added a cardinfo layer for each of them with a 'parent: card' attribute. Then, I grab all of them and put them in an array (called cards) like this: 'cards.push(card). So far so good. :)

The problem starts when I want to modify all cardinfo layers, which are child of the card layers. So when I use 'for card in cards' I can only edit the first cardinfo layer, not all of them. :(

Do you have an idea, how can I modify all child layers of a layer which is in a for-loop? It would be awesome to hear some guesses. Thank you! :)


Steve Ruiz

Hey, you're calling the cardInfo variable left over from the loop, rather than the property you've given to the object you pushed into the cards array on line 83. Instead, in your loop there at the bottom, call card.cardInfo to get the layer stored in that object. Just replacing 'cardInfo' with 'card.cardInfo' will work.

Read the entire post on Facebook