I am hoping there is a way to create a couple nested pages where each directory has it’s own layout that is shared across all files in that directory.
- app.py
- pages
- home.py
- students
|-- demographics.py
|-- grades.py
|-- attendance.py
- behavior
|-- incidents.py
|-- dempgraphics.py
I have my main layout in app.py
, which is pretty much just a dbc.Navbar
. My home.py
will have several general graphs. Ideally, I would like to have nested layout in the students
directory that is shared across all the .py in that folder. Essentially, the same way the layout in app.py
is shared across all pages but just for the files nested under /pages/students
Something like below where /pages/students/layout.py
inherits the layout of app.py
and is shared across all the files in /pages/students
That way I can have all the callbacks in my /pages/students/layout.py
and just have the graphs in say /pages/students/grades.py
- app.py
- pages
- home.py
- students
|-- layout.py
|-- demographics.py
|-- grades.py
|-- attendance.py
- behavior
|-- incidents.py
|-- dempgraphics.py
Is that possible without having the layout.py
(which is pretty much an AG Grid) reloaded when navigating between the nested pages in /pages/students
? I would really like to avoid having both AG Grids for the students and behavior pages in app.py
and just hidden based on the page location.