Redirecting to a different page without the sidebar

Can I somehow redirect the user to a different page in the same app, without getting a new session ?
I’ve been searching for a solution like this for quite a lot of time, but couldn’t find a solution that fits this case

There’s an add-on for that:

1 Like

Yeah this works well, i knew about this add-on before, but this is only possible with the use of the sidebar, right ?
I was curious if there is a way to do this but without the sidebar

Oops. I meant to link to streamlit-extras. There is a switch page function. @blackary makes a lot of useful things…

3 Likes

Nice, thank you for your help

I’m looking for something very similar – moving to a different page of a multi page app – but I’d like to do this with link in markdown text, like “…and go here to do X…”

Does anybody know if that’s possible?

HTML style <a> with target=_self doesn’t work as it opens a new session.

Try this instead:

st.markdown('<a href="/foo" target=_top>Another Page</a>', unsafe_allow_html=True)

Doesn’t work for me, unfortunately! I still get a new session.