twitter/hogan.js — Issue #37: Getting at Outside Context?
Author: cmcavoy
Created: 2012-01-27 22:34:44+00:00
State: open

Hi Friends,

I'm trying to access a function '{{#reverse}}' inside of a list loop '{{#badges.accepted}}' like so:

''' {{#badges.accepted}}

{{/badges.accepted}}'''

It's not working, the 'reverse' function is never called, and I think it's because it's trying to find a reverse attribute within the context of the 'badges.accepted' loop. Is there a way to access the outside context? Something like (totally making this up) '{{#,,/reverse}}'? I'm new to mustache, so this might not actually be a Hogan issue, but thought I'd check. I looked for an IRC channel, or some other place to ask this, but couldn't find anything handy.

Thanks,
Chris