-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
Howdy @cmather
So I'm working on converting Verso over to BL and it makes heavy use of layouts. One thing that we used to do with our old janky layouts system was bind helpers to regions. So something like
<template name="somePage">
{{#Layout template='pageLayout' title=title}}
...
{{/Layout}}
</template>
<template name="pageLayout">
<h1>{{> yield region='title'}}</h1>
{{> yield}}
</template>
Template.somePage.title = function() { return 'Dashboard'; }
So essentially we are passing the content for a region in via the arguments to {{#Layout.
What do you think?
Related ideas:
- set a region content to a template in a similar way?
titleTemplate='foo'perhaps? - remove the need for the redundant feeling
title=titleand just automatically search for a helper namedtitlewhen trying to{{> yield region='title'}}if no content is set for that region.
Happy to implement whatever (actually I'll probably implement the first thing right now in a branch) if you agree on the API..
Reactions are currently unavailable