Skip to content

Commit b3f176a

Browse files
committed
Added doc for storefront groups
1 parent a91c974 commit b3f176a

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

docs/templating/components.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ month_change: true
88
Twig Components are widgets (for example, **My dashboard** blocks from Headless edition) and HTML code (for example, a tag for loading JS or CSS files) that you can inject into the existing templates to customize and extend the user interface.
99
They are combined into groups that are rendered in designated templates.
1010

11-
Built-in Twig Component groups are available for the [back office](custom_components.md), but you can create your own for use anywhere.
11+
Twig Component groups are available for:
1212

13-
To learn which groups are available in a given view, use the [integration with Symfony Profiler](#symfony-profiler-integration).
13+
- [back office](custom_components.md)
14+
- [storefront](customize_storefront_layout.md)
15+
16+
To learn which groups are available in a given view, use the [integration Symfony Profiler](#symfony-profiler-integration).
1417

1518
## Create Twig Component
1619

docs/templating/layout/customize_storefront_layout.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,24 @@ To customize your shop, you can override either whole templates, or specific com
1111
The built-in templates belong to the `storefront` [theme](design_engine.md).
1212
To override any of them, copy its directory structure in your template directory.
1313

14+
## Customize with Twig Components
15+
16+
You can customize parts of the storefront by using [Twig components](components.md).
17+
This allows you to inject your own widgets, extending the storefront behavior.
18+
19+
The available groups for the storefront are:
20+
21+
| Group name | Template file |
22+
|---|---|
23+
| `storefront-before-maincart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart.html.twig` |
24+
| `storefront-after-maincart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart.html.twig` |
25+
| `storefront-before-minicart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/minicart/minicart.html.twig` |
26+
| `storefront-after-minicart` | `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/minicart/minicart.html.twig` |
27+
| `storefront-before-add-to-cart` | `vendor/ibexa/cart/src/bundle/Resources/views/themes/standard/cart/component/add_to_cart/add_to_cart.html.twig` |
28+
| `storefront-after-add-to-cart` | `vendor/ibexa/cart/src/bundle/Resources/views/themes/standard/cart/component/add_to_cart/add_to_cart.html.twig` |
29+
| `storefront-before-summary` | `vendor/ibexa/cart/src/bundle/Resources/views/themes/standard/cart/component/summary/summary.html.twig` |
30+
| `storefront-after-summary` | `vendor/ibexa/cart/src/bundle/Resources/views/themes/standard/cart/component/summary/summary.html.twig` |
31+
1432
## Template customization example
1533

1634
As an example, to change the cart display when it contains no products, you need to override `vendor/ibexa/storefront/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart_empty_cart.html.twig` template.

0 commit comments

Comments
 (0)