You have a two options:
rename the context and add more variables
{{> child data=this groupName='biggroup'}}
Now child
has access to both the parent context and the groupName
. The only trick is that you'll need to access the context via the data
namespace (or whatever you choose to call it) which may seem a little verbose.
<template name='child'>
{{data.someValue}}
{{groupName}}
</template>
extend the context in a helper
Add a helper to the parent template which extends its context like this:
Template.parentTemplate.helpers({
context: function() {
var result = _.clone(this);
result.groupName = 'biggroup';
return result;
}
});
Then in your template you can do:
{{> child context}}
The child
template will then have the parent context along with the groupName
. This is the technique I prefer whenever possible.
Also see my answer to this question if you'd prefer to do this with a global helper.