Skip to content

Commit c7318a5

Browse files
committed
add $_index to docs
1 parent a16b26e commit c7318a5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

documentation/30-complex-field/5-config-methods.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ Allows for a [Lodash template](https://lodash.com/docs/4.17.4#template) to be us
6868

6969
The passed `$template` can also be a [callback](http://php.net/manual/en/language.types.callable.php).
7070

71-
___Note:___ Dashes in field names must be replaced with underscores. For example `field-name-with-dashes` must be referred to as `<%- field_name_with_dashes %>` in `set_header_template()`.
71+
___Note:___ Dashes in field names must be replaced with underscores.
72+
Example: `field-name-with-dashes` must be referred to as `<%- field_name_with_dashes %>` in `set_header_template()`
73+
74+
___Note:___ The group index is available as `$_index` (0-based).
75+
Example: `->set_header_template('This is group <%- $_index %>')`
7276

7377
Example usage:
7478

0 commit comments

Comments
 (0)