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

What is Framer? Join the Community
Return to index
Jacky Lee
Posted Jan 27 - Read on Facebook

Hey everyone, what's the best way for checking the flowcomponent's current page? I am using the following code to do this right now:

layerA.onClick, ->
if flow.current.id is 1
functionA()
else
functionB

So far only flow.current.id works for me, I'm wondering if anyone else has successfully used flow.current.name or something similar for this?

Many thanks in advance 🤙🏻

2 Comments

Jonas Treub

flow.current returns the current layer which can be directly compared with your layers. Like so:
flow.current == layerA

Jonas Treub

When comparing with multiple layers I would recommend using a switch.

Read the entire post on Facebook