Quick iron.router question


I’m using this

Router.route('/', function () {

Sure, it works as intended but how do i choose where the template “something” gets rendered?

Currently it puts the template in the bottom of the page, but i want it inside a div.
{{> something}} doesnt work since that displays the template all the time.
I hope you understand my question. I want to render different templates based on the route, inside the same div.

Just for hardcore clarification, im going to write it in an imaginary language :wink:

<div class="content">
    {{#if mysite.com/home}}
        {{> home}}
    {{#if mysite.com/help}}
        {{> help}}


Iron Router’s docs explain this clearly

for your benefit, I’ll write a short example:

/* JS */

 // configure a layout (master) template
layoutTemplate: 'layout'

// configure a specific route
Router.route('/',  {
    name: 'something'

/* HTML */
<template name="layout">
<!-- this is where your route would be rendered -->
{{> yield }}

// some template to render within layout
<template name="something">


Thank you!

Can you link me to the docs where this is explained? I’ve rea the docs for 20 minutes, could not find it



Amazing, thank you :blush: