Page Layout: how to add additional ui.footer content #187
-
How do I add additional labels in the footer of a layout page?
from nicegui import ui
@ui.page('/')
async def page_layout():
ui.label('CONTENT')
with ui.header():
ui.label('HEADER')
with ui.left_drawer(top_corner=True, bottom_corner=True):
ui.label('LEFT DRAWER')
with ui.right_drawer(fixed=False):
ui.label('RIGHT DRAWER')
with ui.footer():
ui.label('FOOTER')
global rowData
rowData = ui.row()
with rowData:
ui.label("This is working")
with rowData:
ui.label("This is not working")
ui.run()
def testing():
with rowData:
yield
ui.label("This is not working")
testing()
ui.run() |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Dec 2, 2022
Replies: 1 comment 3 replies
-
When should Triggering the new label from, e.g., a button on another site is working: @ui.page('/other_page')
def other_page():
def add():
with rowData:
ui.label('This is not working')
ui.button('add another label', on_click=add) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
JS-Aibel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When should
ui.label("This is not working")
be added?rowData
is only defined and initialized when a client accesses the page andpage_layout()
is evaluated for the first time. Before thatrowData
is undefined.Triggering the new label from, e.g., a button on another site is working: