Accessing parent Template from within {{#each}} blocks

29 views Asked by At

In my code, I do the following:

<template name=A>
  {{#if something}}
    {{#each items}}
       {{> items}}
   {{/each}}
{{/if}}
</template>

Elsewhere I need to get the instance of the parent template (A) but using template.view.parentView returns template names "each", one level above "if", etc. Is there a way how to get the actual template without iterating and comparing the names?

The parentView returns everything in the chain, but I obviously need the actual templates.

0

There are 0 answers