Is it possible to set layout to an Asyncsite? #2110
Answered
by
a-ghorbani
a-ghorbani
asked this question in
Q&A
-
Can we configure the layout for an AsyncSite? I've been unable to find an example in the documentation. Is the this code a correct way of do it? site = AsyncSite()
page = site["/mysite"]
page["meta"] = ui.meta_card(
box="",
theme="h2o-dark",
layouts=[ui.layout(...)...]) |
Beta Was this translation helpful? Give feedback.
Answered by
a-ghorbani
Aug 7, 2023
Replies: 1 comment 1 reply
-
You can configure everything like in any Wave app/script, including layouts. It's hard to say without seeing the full code, but my guess is you forgot to call the save: site = AsyncSite()
page = site["/mysite"]
page["meta"] = ui.meta_card(
box="",
theme="h2o-dark",
layouts=[ui.layout(...)...])
await page.save() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My bad. The issue was that I mistakenly used page.drop() to remove the cards. I didn't notice that 'meta' is also a card that would be removed as well.