I\'m trying to build a smart package for Meteor app that provides some monitoring capabilities and other tools based on the features of the smart package. For more details read
Isn't this doable by simply using Meteor router and template helpers:
Specify your routes:
Meteor.Router.add({
'/foo' : 'foo',
'/admin': 'admin'
});
Let's say you have a 3 column layout. Create your template like this:
{{renderPage LeftLayoutName}}
{{renderPage MiddleLayoutName}}
{{renderPage RightLayoutName}}
Then specify your template helpers:
Template.body.helpers({
LeftLayoutName: function() {
switch (Meteor.Router.page()) {
case 'foo':
return 'foo_left';
case 'admin':
return 'admin_left';
}
},
MiddleLayoutName: function() {
switch (Meteor.Router.page()) {
case 'foo':
return 'foo_middle';
case 'admin':
return 'admin_middle';
}
},
RightLayoutName: function() {
switch (Meteor.Router.page()) {
case 'foo':
return 'foo_right';
case 'admin':
return 'admin_right';
}
}
});