我正在使用新的 blaze-integration
IR的分支并对现有应用程序进行了必要的更改。我在我的一个模板中有一个yield区域:
<div>
{{> yield region='signup-detail'}}
</div>
我想在路由配置中使用设置此区域 yieldTemplates
。我的路线配置如下:
this.route('signUpInfo', {
path: '/sign-up',
template: 'signUp-form',
yieldTemplates: _.extend({}, mainYieldTemplates, {
'information': {to: 'signup-detail'}
})
});
mainYieldTemplates = {
'footer': { to: 'footer' },
'header': {to: 'header'}
};
我的模板“信息”未呈现 signup-detail
。只有新的鲨鱼分支和IR火焰发生,使用Yield模板有什么变化吗?
页脚和页眉模板设置正确。
编辑:模板布局
<template name="basicLayout">
{{> yield region='header'}}
<div class="container">
<div class="row">
<div class="col-md-12 col-centered padding-top-four-em">
{{> yield}}
</div>
</div>
<hr>
<footer>
{{> yield region='footer'}}
</footer>
</div>
</template>
编辑2:SignUp表单模板
<template name="signUp-form">
<div class="col-md-12 signup-container">
{{>signUpSideBar}}
<div class="col-md-9 signup-content gray-border-box">
{{> yield region='signup-detail'}}
</div>
</div>
</template>
注意:signUp-form模板有一个区域 signup-detail
。这是我的路线 signUpInfo
需要渲染 information
该地区的模板。这曾经在火焰整合之前在IR中工作。