You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/templating/components.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,9 @@ description: Twig components allow you to inject any custom widgets into selecte
7
7
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.
8
8
They are combined into groups that are rendered in designated templates.
9
9
10
-
Twig Component groups are available for:
10
+
Built-in Twig Component groups are available for the [back office](custom_components.md), but you can create your own for use anywhere.
11
11
12
-
-[back office](custom_components.md)
13
-
-[storefront](customize_storefront_layout.md)
14
-
15
-
To learn which groups are available in a given view, use the [integration Symfony Profiler](#symfony-profiler-integration).
12
+
To learn which groups are available in a given view, use the [integration with Symfony Profiler](#symfony-profiler-integration).
16
13
17
14
## Create Twig Component
18
15
@@ -35,7 +32,7 @@ The available attributes are:
35
32
36
33
This way requires writing custom code, but it allows you to fully control the rendering of the component.
37
34
38
-
### YAML Configuration
35
+
### YAML configuration
39
36
40
37
You can create a Twig Component and add it to a group using YAML configuration, as in the example below:
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`](https://github.com/ibexa/storefront/blob/main/src/bundle/Resources/views/themes/storefront/cart/component/maincart/maincart_empty_cart.html.twig) template.
0 commit comments