Skip to content

Commit 5899626

Browse files
IBX-9564: ibexa_product_catalog_group_attributes described in Developer Documentation (#2626)
* filter added in dev-doc * fixes after review * fix * example updated
1 parent 5a32474 commit 5899626

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/templating/twig_function_reference/product_twig_functions.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,21 @@ The `ibexa_is_pim_local` is a helper Twig function that enables changing the beh
129129
<button type="button">Modify product data</button>
130130
</div>
131131
{% endif %}
132+
```
133+
134+
### `ibexa_product_catalog_group_attributes`
135+
136+
The `ibexa_product_catalog_group_attributes` filter groups product attributes based on the [attribute group]([[= user_doc =]]/pim/work_with_product_attributes/#create-attribute-groups) they belong to.
137+
138+
#### Example
139+
140+
``` html+twig
141+
{% for group, attributes in product.attributes | ibexa_product_catalog_group_attributes %}
142+
<ul>{{ group.name | capitalize }}
143+
{% for attribute in attributes %}
144+
{% set attribute_definition = attribute.attributeDefinition %}
145+
<li>{{ attribute_definition.name }} : {{ attribute | ibexa_format_product_attribute }}</li>
146+
{% endfor %}
147+
</ul>
148+
{% endfor %}
132149
```

0 commit comments

Comments
 (0)