How to access the current page in a multipage app?
2 Likes
Hey @erispoe! We're working on a way to access the current page via retoolContext/something similar. In the meantime a workaround I've found is reading the url via the url
global.
Since each page has its own url you can parse it to figure out what page you're on. Know it's not ideal but hopefully it can unblock you for the time being
Thanks and yes that's what I do, with a transformer:
return {{ pages.value[url.href.split("/").pop()] }}
Multipages apps are very promising thanks!
1 Like