meteor - Iron-router with in a static context -


i've following page:

main.html

<html> <body>    <div>       [more static content]       <div id="content"></div>    </div> </body> </html> 

tpl1.html

<template name="something">    [...] </template> 

and want use iron-router fill "something" template "content" div. cannot find way route path render div. tried like:

<div id="content">{{yield}}</div> 

but result is:

<html> <body>    <div>       [more static content]       <div id="content"></div>    </div>    [... content "something" template ...] </body> </html> 

and not:

<html> <body>    <div>       [more static content]       <div id="content">[... content "something" template ...]</div>    </div> </body> </html> 

what want do.

my iron-router config is:

router.map(function () {     this.route('principal',{         path:"/someaction",         template:"something"     }); 

¿how can that? thanks!

you have it. additional code should need adding {{yield}} div:

<html> <body>    <div>       [more static content]       <div id="content">{{yield}}</div>    </div> </body> </html> 

if read down iron-router github bit should find great section talking yield. can use multiple ones.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -