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

What is Framer? Join the Community
Return to index
Hendrik Kleine
Posted Jul 19 - Read on Facebook

Hi Guys, does anyone know how to return the current page in a PageComponent?

For example, I have 4 pages in my PageComponent. And I want a text layer to change depending on which page is currently being displayed, something like;

if page.verticalPageIndex(page.currentPage) = 0
then layerA.html "Cool Page"
if page.verticalPageIndex(page.currentPage) = 1
then layerA.html "Even better Page"

But the index always returns zero 😖


Jordan Robert Dobson

So is it vertical or horizontal?

Also I think you just need to do

Print page.currentPage


print page.verticalPageIndex

And you'd want to do it on an event on the page component.

Check the docs for page component events to test off of.

Read the entire post on Facebook