You could use {{>Template.dynamic template=stepTemplate data=stepData}} in the template for /experiment', wherestepTemplate` is a ReactiveVar that will contain the template names for the different steps. Here is an extremely simplified example how this could work (just edited a bit to make all parts play better)
Template.experiment.onCreated(function () {
const instance = this;
instance.step = new ReactiveVar('stepOne');
instance.steps = {
stepOne: {
nextStep: 'stepTwo',
title: 'Next Step',
message: '<h2>This is the 1st step</h2>',
},
stepTwo: {
nextStep: 'stepThree',
title: 'One more Step',
message: '<h2>This is the 2nd step</h2>',
},
stepThree: {
message: '<h2>You did it, you finished all steps</h2>',
},
};
});
Template.experiment.helpers({
stepTemplate() {
return Template.instance().step.get();
},
stepData() {
const instance = Template.instance();
var step = instance.steps[instance.step.get()];
// return the data the step template should receive
return step;
},
});
Template.experiment.events({
'click button'(event, instance) {
var nextStep = event.currentTarget.dataset.nextStep;
instance.step.set(nextStep);
},
});
And the templates could be
<template name="experiment">
{{>Template.dynamic template=stepTemplate data=stepData}}
</template>
<template name="stepOne">
<h1>Step One</h1>
{{{message}}}
{{#if nextStep}} <button data-next-step="{{nextStep}}">{{title}}</button>{{/if}}
</template>
<template name="stepTwo">
<h1>Step Two</h1>
{{{message}}}
{{#if nextStep}} <button data-next-step="{{nextStep}}">{{title}}</button>{{/if}}
</template>
<template name="stepThree">
<h1>Step Three</h1>
{{{message}}}
{{#if nextStep}} <button data-next-step="{{nextStep}}">{{title}}</button>{{/if}}
</template>