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

What is Framer? Join the Community
Return to index
Rahul Dhyawala
Posted Dec 29 - Read on Facebook

How do you set an attribute to a Framer Layer so you can reference that layer later on based on attribute
Ex- = "10" = "20" = "50"

Now i want to reference the layer that has name, let say 20.


Benjamin Den Boer

Hey Rahul Dhyawala, you could store the layers you wish to target by name in an array, loop over it and then target them by the name attribute instead of by variable.

Rahul Dhyawala

i know this.. but i have lots of layers.. more than 100. Then it doesn't seem optimal way. Can't I directly reference like getlayerByName or something?

Seoh Char

`Framer.CurrentContext.getLayers` could help you

Rahul Dhyawala

Thanks Benjamin and Seoh

Read the entire post on Facebook