Closed jozkotrapko closed 9 months ago
Sorry, this is a bit confusing, but hide_pages
doesn't take a list of Page objects, but takes a list of page names. You also can only add pages that have actually been added to the sidebar through show_pages
.
So, the following code should work:
from st_pages import show_pages, hide_pages, Page
show_pages(
[
Page("home.py"),
Page("pages/test.py"),
Page("pages/example.py"),
]
)
hide_pages(
[
"Example",
]
)
I'll update the README to be more clear about how to use hide pages
nice!
According to the documentation i should be able to hide page using
hide_pages
and then open it anyway via URL link as they are hidden via CSS only.But when I try to open this hidden page via URL, I get:
I get an error via streamlit whenever I try to open the URL "http://localhost:8501/example" with this code:
Can anyone help? Thank you!