Hi Phil,
My understanding is that the options you have are as follows:
1. Pass the arguments into the template in the data context, i.e
{{with options}}
{{> template}}
{{/with}}
OR
{{> template options}}
The downside is that normally you want to pass data (as in something from mongo) in there, rather than view-specific stuff.
Obviously you can munge it with something like:
Template.foo.options = function() {
return {data: data, options = {alignRight: true, width: '200px'}}
}
But this feels a bit hacky, because you really want to write that stuff in the html file.
2. Create a helper that just calls a template:
{{templateHelper alignRight='true' width='200px'}}
Handlebars.registerHelper('templateHelper', function(options) {
// you can get the arguments at options.hash.X
return new HandlebarsSafeString(Template.foo(…));
}
This is the approach taken by loginButtons in accounts-ui.
This could be generalised to take the name of a helper as an argument, and do nice things (in …) to marshall the data + options for you.
Sidebar: Although it'd be nice to just extend {{>}} to take options, ala:
{{> template alignRight='true' width='200px'}}
I think the meteor guys are leery of doing this as they've already strayed away from core handlebars a bit already.
Too much information and no good answer to your question? Sorry about that :)
Tom