I am trying to render a dynamic template inside a dynamic template.
Main Layout:
<template name="template1">
{{>navbar}}
<div class="container">
{{>Template.dynamic template=content}}
</div>
</template>
Sub-Template:
<template name="template2">
<div class="container">
<div class="row">
<h2>Data Input</h2>
</div>
<div class="row">
<ul class="nav nav-pills">
<li class="active"><a href="/input/inc">Inc</a></li>
<li><a href="/input/exp">Exp</a></li>
</ul>
</div>
<div class="row">
{{>Template.dynamic template=dataSection}}
</div>
</div>
Sub-sub-Template:
<template name="template3">
<h2>Inc</h2>
</template>
Below is my FlowRouter code. It is wrong, but I thought it might give someone an idea of what I am trying to do. FlowRouter:
FlowRouter.route('/input/income', {
action: function () {
BlazeLayout.render("template1", {
content: "template2"
});
BlazeLayout.render("template2", {
dataSection: "template3"
});
}
});
I am trying to render the template2, inside of template1 and then after that I would like to render template 3 inside of template 2. Do I have to somehow render template 3 inside of template 2 before I can render that template inside of Template1?