Genie Discord forum
I would like to create an application where there is either a top or side menu that, when an item is selected, renders the rest of the page with the contents related to it. Is there an example of this somewhere? Thanks in advance!
We have an example of a page with multiple tabs. You'll probably need to edit the HTML manually though, tabs do not look very nice in Genie Builder yet
If what you want is multiple pages, that is not supported in Genie Builder yet. If you were to do it manually, here's how:
- create a pagex.jl.html for each page
- define a route to the page with @page("/pagexroute", "pagex.jl.html")
For the navigation bar, you could include it in the HTML of every page or use a layout. We don't have docs for layouts yet, but I'll show how to use them at the JuliaCon workshop.f
Thanks! I'll look into it and come back if I get stuck. So happy with your support!
I got it working! The only weird thing is that I see the overshoot.jl.html twice in the genie server view while the app clearly uses 2 different html pages, namely home.jl.html and overshoot.jl.html
The error is gone with the update but I still get double entries in the Genie apps panel. It's not causing any problems but I thought I'd mention it anyway.
There's one other thing. Everytime I edit a page with the nocode editor, the line "<% partial("nav.jl.html") %>" is transformed into "<% partial("nav.jl.html") %>". Is there a way to avoid this?
The duplicate issue seems to be related to the number of added pages. Well, there seems to be a correlation, not sure it it's the cause though.
@Mordegai Thanks for reporting the issue. I've been trying to reproduce the issue without luck, though. Please could you provide a simplified example app where the issue is manifested so that I can reproduce and investigate? Thanks again!
@Mordegai update on my message above: no need to send any example app, we were able to reproduce the issue and are now investigating. Will let you know when we make any progress. Thanks!