I was trying to extend an application and found out that whenever I try to access the _id value from inside an #if clause, it always returns empty...
This example returns the {{_../id}}:
<template name="showsId">
{{# each comments}}
<div class="id">{{../_id}}</div>
{{/each}}
</template>
But this one doesn't:
<template name="doesNotShowId">
{{# each comments}}
{{#if editingComments}}
<div class="id">{{../_id}}</div>
{{else}}
<div class="id">{{../_id}}</div>
{{/if}}
{{/each}}
</template>
Do you know why this might be happening? As far as I know this should work as expected.
EDIT:
This is a template that's being called from another one, in this fashion:
<template name="statusitems">
<div>
{{#each statusItem}}
<div>
{{> statusComments }}
</div>
{{/each}}
</div>
</template>
That's why I'm asking for the {{../_id}}.