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