Why would you need multiple slots in a Layout?

I’m new to Anvil and have a basic question - why would you need more than one slot in a Layout? Also, if you’re creating an app with a Layout - let’s say a basic navigation bar on the left side of the UI - why do you need to add a slot? What is the consequence of not adding a slot?

Disclaimer: I’ve been doing “layouts” via code for so long, and that’s worked so well for me, that I haven’t really tried the new Layout feature as is. So this is my best guess. But I think it’s a more-than-reasonable one.

It really depends on what you want your Layout to achieve. That is, how many different places are in the Layout, where you want the Layout’s instance to be able to customize things.

For example, I can see wanting to customize a menu, and a header, and a footer, when applying a Layout.

3 Likes