Reputation: 157
I tried ,but i cant get it to work! i changed the value of Template in many ways, but still not working.
In html >>
<body>
{{> Template.dynamic template=Template data=data}}
</body>
In Meteor.isClient >>
Template.body.helpers({
'Template': function() {
return page.template;
},
'data': function() {
return page.getTemplate();
}
});
I'm using the last version, 1.1.0.2
Upvotes: 2
Views: 48
Reputation: 1367
You asked that in another thread as well and I made a MeteorPad for that:
http://meteorpad.com/pad/oPhK4KqjiSztRSa9K/SimpleDynamicTemplateSwitch
Cheers, Tom
Ref to the similar thread: How to force Template.dynamic to re render
Upvotes: 1
Reputation: 64342
A few suggestions:
page.template
is a string. It should be the name of the template and not a template instance.page.getTemplate()
is a simple object - this should be a template context and not a template instance.Template
for your helper causes some kind of conflict. Try templateName
or something more descriptive.Upvotes: 2