Group templates

Overview

Group template names need to start with groups. and have the extension .ws, a valid group template name would be groups.wands.ws. In a group page we have access to group editables

Below you can see all the available group templates


Name Description
groups.single.ws Standard group templates
groups.single.alt.ws Standard group template for pagination
groups.{name}.ws Custom group templates
groups.{name}.alt.ws Custom group template for pagination
 

groups.single.ws

This is the standard group template. You use this template to display the groups that you have in your webshop. When you create a new group in your webshop this will be the default template.

 

Display products in current group

The variable my_products contains an array with all of the products from the group that the user is currently visiting (e.g /catalog/groups/wands.

In the include there should be a loop that goes through each items in the array (my_products).

<div id="products-wrapper">
  {% assign my_products = group.products %}
  {% include 'products' %}

</div>

groups.single.alt.ws

This is related to groups.single.ws, and you use this when you want to use pagination. To use this template you need to have the standard groups.single.ws.

In this template you don't need to have any extra HTML. The only thing you really need is inside the snippet below.

 

Display products with pagination

Display 10 products per page. You can choose the limit yourself. 

{% assign my_products = group.products.limit=10.paginate %}
{% include 'products' %}
 

groups.{name}.ws

This is a customizable group template. Replace {name} with your choice. With these kinds of templates you can have different types of styling on different webshop groups.

You can use the same type of snippets that you can find under groups.single.ws.

 


groups.{name}.alt.ws

This is a customizable group template for pagination. Replace {name} with your choice. 

You can use the same type of snippets that you can find under groups.single.alt.ws.

Updated: 2020-05-20