Lines Matching refs:data

82 Now the we've created our template file, in a php file (index.php) we'll create the data to passed to the model. The model is a key/value array.
84 Below we are going to create the Handlebars object, set the partials loader, and put some data in the model.
122 The simplest way to assign data is to create an Array model. The model will contain all the data that will be passed to the template.
230 Handlebars also allows for name conflict resolution between helpers and data fields via a this reference:
379 The #each helper (php only) also has the ability to slice the data
680 In Handlebars JS v1.1, data variables `@first` and `@last` were added for the #each helper. Due to the these variables
681 not being backwards compatible, these data variables are disabled by default and must be enabled manually.
683 To enable the new data variables, set the `enableDataVariables` option to `true` when instantiating the Handlebars
694 Given the following template and data:
696 {{#each data}}{{#if @first}}FIRST: {{/if}}{{this}}<br>{{/each}}
699 'data' => ['apple', 'banana', 'carrot', 'zucchini']
706 Given the following template and the data above:
708 {{#each data}}{{@first}}: {{this}}<br>{{/each}}
718 {{#each data}}{{#each this}}outer: {{@../first}},inner: {{@first}};{{/each}}{{/each}}
721 'data' => [['apple', 'banana'], ['carrot', 'zucchini']]
728 Be aware that when data variables are enabled, variables starting with `@` are considered restricted and will override
729 values specified in the data.
731 For example, given the following template and the following data, the output will be different depending on if data
744 $data = ['objects' => [$object]];
751 $engine->render($template, $data)
761 When `enableDataVariables` is `true`, the behavior matches HandlebarsJS 1.1 behavior, where all data variables replace
762 variables defined in the data and any data variable prefixed with `@` that is unknown will be blank.