Refactoring templates - parent problem

We have a number of modal dialogs. The Cancel/Save part of them is identical, so it would be good to factor that out to its own template.

But each dialog has a reactive variable on the template itself, controlling the active state of the Save button. There doesn’t seem to be any sane way to give the sub-template code access to this variable, making this refactoring impossible. Or am I missing something?

I’m primarily interested in if refactoring like this is doable in Meteor, but other ways of making this work are also interesting.

Concrete code:

<template name="modalA">
  <div id="modalA" class="modal fade">
    // content omitted
    {{> cancelSave}}

Template.modalA.created = function() {
  this.isSaveableReact = new ReactiveVar(false);
    template.autorun(function() {

  isSaveable: function() {
    return Template.instance().parent().isSaveableReact.get(); // THIS IS IMPOSSIBLE

Use this:

// Returns an ancestor instance of this template instance (by name)
// See
Blaze.TemplateInstance.prototype.parentInstance = function (templateName) {
  if (! /^Template\./.test(templateName))
    templateName = 'Template.' + templateName;
  var view = this.view;
  while (view = view.parentView)
    if ( === templateName)
      return view.templateInstance();

Or have a look at

The latest version of meteor-template-extensions throws warning because it tries to create template functions that already exist in the latest version of Blaze that comes with METEOR@

Template.onCreated = function (callback) {

Template.onRendered = function (callback) {

Template.onDestroyed = function (callback) {