Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Oct 2, 2012
1 parent 1d8cb17 commit 10d985c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Guides/sample_code/indexes.md
Expand Up @@ -221,7 +221,7 @@ It must "*provide a Mustache section both values for the `position`, `isOdd`, an
It looks like we have two sets of informations here: the original object's properties on one side, and the position keys on the other side.
This sounds like the job of the [Mustache context stack guide](../runtime/context_stack.md): generally speaking, in the template snippet `{{#outer}}{{#inner}}...{{/inner}}{{/outer}}`, the enclosed content can access both properties of `inner` and `outer`. If a key can not be found in `inner`, the lookup goes on in the context of the enclosing section, `outer`, etc.
This sounds like the job of the Mustache [context stack](../runtime/context_stack.md): generally speaking, in the template snippet `{{#outer}}{{#inner}}...{{/inner}}{{/outer}}`, the enclosed content can access both properties of `inner` and `outer`. If a key can not be found in `inner`, the lookup goes on in the context of the enclosing section, `outer`, etc.
Let's get back to our specific `PositionFilterItem` class. It is used when Mustache renders an array: `{{# withPosition(people) }}...{{/ withPosition(people) }}`. If we wrap the inner section string with another section, that we bind to the original object, as in `{{#originalObject}}...{{/originalObject}}`, then the inner section will have access to both our `PositionFilterItem` properties, and the original object's properties. Exactly what we need, actually.
Expand Down

0 comments on commit 10d985c

Please sign in to comment.