xp-forge / handlebars-templates

Handlebars templates for XP web frontends
1 stars 0 forks source link

Add support for fragment parameters #20

Closed thekid closed 5 months ago

thekid commented 6 months ago

This PR allows passing parameters to fragments, which are then passed to the fragment during execution.

{{#*fragment "items" select=items separator=", "}}
  {{#each select}}
    {{.}}{{#unless @last}}{{separator}}{{/unless}}
  {{/each}}
{{/fragment}}
thekid commented 5 months ago

Released in https://github.com/xp-forge/handlebars-templates/releases/tag/v3.3.0