Open
Description
Given the following context:
{
name: 'Hello World',
list: [
{ data: '123', name: 'one' }
{ data: 'abc' }
]
}
The following:
{{#list}}
{{data}} - {{#name}}{{name}}{{/name}}
{{/list}}
Will output something like:
123 - one
abc - Hello World
It might be nice if you could syntactically limit the context to the current iteration
{{#list}}
{{.data}} - {{#.name}}{{.name}}{{/.name}}
{{/list}}
To get:
123 - one
abc -
The use case I have is printing out html sytlesheet include fragments: the optional title attribute is missing, and it's finding the page title attribute up the context stack.
{{#stylesheets}}
<link rel="stylesheet" href="{{href}}" type="text/css" {{#title}}title="{{title}}" {{/title}}charset="utf-8">
{{/stylesheets}}
....
<h1>{{title}}</h1>
Metadata
Metadata
Assignees
Labels
No labels