Render separate toolbars based on section of site


#1

Curious how other people are doing this…

We have a “toolbar” of sorts, it’s in a tag of our our global layout, currently rendered via a named outlet. The controls in the toolbar vary based on sections of the site. The plan was to render the correct toolbar template into that outlet in the routes that need it, however I’m starting to feel this is the wrong use of outlets. Has anyone else encountered a similar use case? How did you handle it?

Thanks!


#2

I started doing something similar to this approach, but I’ve moved away from it due to complexity that I couldn’t justify. I’ve changed all sidebars/toolbars into partial templates and they are loaded from within the current template in the main outlet.


#3

I have done these like @tsantos83.