How to best set the HTML title when using iron-router? Here's what I'd like to do:
<template name="layout">
<head><title>{{KAZOOM}}</title></head>
<body>
{{> menu}}
{{yield}}
</body>
</template>
<template name="example">
{{KAZOOM 'example page'}}
That's just an example page
</template>
<template name="foo">
{{KAZOOM 'foo page'}}
Another example page with different HTML title
</template>
You see how the KAZOOM travels back in time to set the HTML title? The reason I wish to do it that way is that I consider the HTML title to be part of the content. It would be nice I could adjust the HTML title of a page by just editing the template that generated it. Unfortunately I don't see a clean way to achieve this. The closest I can think of would be named yields, then the title would be set by the route, not by the template.
The other possibility is to just forgo the layout template and always include a header:
<template name="head">
<head><title>{{this}}</title></head>
{{> menu}}
</template>
<template name="example">
{{> head 'example page'}}
That's just an example page
</template>
<template name="foo">
{{> head 'foo page'}}
Another example page with different HTML title
</template>
That is not very nice. Do you have a proper solution to this?