Layouts - How to auto select form by default

I’m quite interested in using layouts with the new M3 beta theme. Everything is working great but I have one issue. I have a slot on my template form as the tutorial details.

But then how am I supposed to “click” or activate a form by default? I tried wiring up the buttons to open_form but with the M3 beta that causes a recursion issue (I’m guessing y’all have some imports we can’t see in the M3 beta theme).

For now I just have a blank slot when the page loads and the user has to click to open a page. I suppose I could add a content_panel and manually clear it every time a new form is clicked. But this seems clugey and less that what y’all would like.

what do you mean by click to activate the form? can you share a clone link or code snippet?

Here is a screenshot. Each of the buttons is connected to a form. That works great no issues. But when I load the Nav no content form is there, because the Nav is just the Nav with a slot.

I want to have one of the forms be “clicked” by default.

If you’re starting from scratch - consider using the routing dependency.

This’ll make the navigation links in the sidebar work as you describe
(swap the NavigationLink components for routing.router.NavLink components - which themselves are subclasses of the m3 NavigationLink)

1 Like

Ah nice yes this is a from scratch app. I’ll give it a shot thanks.

Well that just worked. Redirection is easy and works great. I used the class to ensure users are logged in like in the docs. Works!

2 Likes