The multipage tutorial is useful. However, it doesnât mention how to refer pages.
Steps to reproduce
Letâs say we want to cite page2 using markdown in main_parge.
How to make [page2](??label??) jumping to page2?
Code snippet:
# Contents of ~/my_app/main_page.py
import streamlit as st
st.title("Main page")
st.markdown("[page2](??label??)")
# Contents of ~/my_app/pages/page_2.py
import streamlit as st
st.title("Page2")
thank you for this. It was a lot of help!! I wonder how can we jump to the page but stay in the same window or how to close the window we just left? Iâm very new to Streamlit, sorry if it is a very beginner question.
The method described above by zxdawn will work, but it will reset the session state.
If you want to maintain the session state when you switch between pages of a multi-page app, then youâll need the switch_page function: https://extras.streamlit.app/Switch%20page%20function
Hello there đđ»
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking âAccept allâ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.