O'Reilly logo

Meteor: Full-Stack Web Application Development by Marcelo Reyna, Isaac Strack, Fabian Vogelsteller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Switching to a layout template

Even though we passed a template to our Home route using template: home, we are not rendering this template dynamically; we are just showing the layout template with its hardcoded subtemplates.

To change this, we need to replace the {{> home}} inclusion helper inside our layout template with {{> yield}}.

The {{> yield}} helper is a placeholder helper provided by iron:router, where route templates get rendered.

After doing this, when we check out the browser, we shouldn't see any change, as we are still rendering the home template, but this time dynamically. Then we proceed as follows:

  1. In order to see whether this is true, we will add a not found template to our app, by adding the following template to our layout.html ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required