Cart count template (cart)

Description

Define a Handlebars template used to display content of each item inside cart box.

Values passed to the template are:

  • indexUrl - URL of the selected item. It will be displayed in cart box

  • title - contents of item title

  • summary - contents of item summary

Widget contains predefined Handlebars partial templates that can be used:

  • {{indexURL}} - display {{indexURL}} from data model passed to template

  • {{title}} - display {{title}} from data model passed to template

  • {{summary}} - display {{summary}} from data model passed to template

Default value

item: {
  template: '<h4><a href="{{indexUrl}}">{{#truncate 70}}{{title}}{{/truncate}}</a></h4><cite class="text-success">{{#cut "https://"}}{{indexUrl}}{{/cut}}</cite><p>{{#truncate 255}}{{summary}}{{/truncate}}</p>',
}

Examples

item: {
  template: '<h4><a href="{{indexUrl}}">{{#truncate 70}}{{title}}{{/truncate}}</a></h4><cite class="text-info">{{indexUrl}}</cite><p>{{#truncate 255}}{{summary}}{{/truncate}}</p>'
}