Hello,
I have the following code:
Visible pages
home_page = st.Page(page=“pages/landing_page.py”, title=“Home”, icon=“:material/home:”, default=True)
add_forecast_page = st.Page(page=“pages/berth_planning_location.py”, title=“Choose Location”, icon=“:material/location_on:”)
signal_deletion = st.Page(page=“pages/signal_deletion.py”, title=“Signal Conversion”, icon=“:material/contract_delete:”)
Navigation
pg = st.navigation({
“Info”: [home_page],
“Forecast”: [add_forecast_page, signal_deletion]
})
pg.run()
My problem is that during navigation (e.g., navigating from add_forecast_page
to landing_page
and then back to add_forecast_page
), how can I add a condition (session state) to ensure the page starts loading from the beginning instead of retaining the previous state?
It would be great to use the st.navigation and utilising the default side bar instead of building a separate one