iron-meteor / iron-router

A client and server side router designed specifically for Meteor.
MIT License
1.98k stars 413 forks source link

contentFor doesn't work with 'sublayouts' #1492

Open t3db0t opened 8 years ago

t3db0t commented 8 years ago

Suppose a set of templates like this:

<template name="layout">
  layout<br/>
  {{> yield "title"}}
  {{> yield}}
</template>

<template name="sublayout">
sublayout<br/>
{{#contentFor "title"}}test{{/contentFor}}
{{> yield}}
</template>

<template name="content">
{{#Layout template="sublayout"}}
content<br/>
{{/Layout}}
</template>

With a route directed to content using layout. The contentFor helper in sublayout cannot seem to 'find' the title region. Is this by design, or a bug? Is there a workaround?