Different shell templates for one or more routes


#1

I’d like to have multiple ‘shell’ templates that can be applied to different routes without resorting to nested routes. For example:

/login: ‘login’ content in a ‘welcome’ template
/register: ‘register’ content in a ‘welcome’ template
/privacypolicy: ‘privacypolicy’ content in a ‘content’ template
/tandc: ‘tandc’ content in a ‘content’ template
/dashboard: ‘dashboard’ content in an ‘authenticated’ template
/settings: ‘settings’ content in an ‘authenticated’ template

What’s the best way to do this? I’m currently doing it using multiple this.render() calls to render the desired shell and then the desired content into the desired shell, but is there a better way?


#2

Make each shell a component with a {{yield}} in the template. Then wrap the respective pages in the shell component.