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
Place the icon in `public/assets/images` and run `yarn encore <dev|prod>` after adding it.
@@ -23,13 +25,15 @@ Place the icon in `public/assets/images` and run `yarn encore <dev|prod>` after
23
25
24
26
To ensure proper display in the back office, all icons should have SVG format with `symbol`.
25
27
26
-
If you want to configure icons per SiteAccess, see [Icon sets](#icon-sets).
28
+
Use the [scope](multisite_configuration.md#scope) if you want different icons for different SiteAccesses.
27
29
28
-
To see more configuration options, see [the icon reference](icon_twig_functions.md).
30
+
To see more Admin UI's `ids-assets` icons, see [the icon reference](icon_twig_functions.md#icons-reference).
29
31
30
32
### Access icons in Twig templates
31
33
32
-
Content type icons are accessible in Twig templates via the `ibexa_content_type_icon` function.
34
+
#### Content type icons
35
+
36
+
Content type icons are accessible in Twig templates via the [`ibexa_content_type_icon()` function](icon_twig_functions.md#ibexa_content_type_icon).
33
37
It requires content type identifier as an argument. The function returns the path to a content type icon.
34
38
35
39
```twig
@@ -38,6 +42,10 @@ It requires content type identifier as an argument. The function returns the pat
38
42
</svg>
39
43
```
40
44
45
+
#### UI Icons
46
+
47
+
User interface icons are accessible with [`ibexa_icon_path()` function](icon_twig_functions.md#ibexa_icon_path). The function returns a path from an icon identifier and an [icon set](#icon-sets) identifier arguments.
48
+
41
49
### Access icons in JavaScript
42
50
43
51
Content types icons configuration is stored in a global object: `ibexa.adminUiConfig.contentTypes`.
@@ -89,7 +97,9 @@ The following example from the `alert.js` file shows configuration for icons in
89
97
- `name`- the path is generated inside the component provided you use icon from the system
90
98
- `extraClasses`- additional CSS classes, use to set for example, icon size.
91
99
92
-
## Icon sets
100
+
## Customize UI icons
101
+
102
+
### Icon sets
93
103
94
104
You can configure icon sets to be used per SiteAccess:
The icon sets are used by [`ibexa_icon_path()` Twig function](icon_twig_functions.md#ibexa_icon_path).
118
+
119
+
- If you change the `default_icon_set` from one SiteAccess to another, `ibexa_icon_path(icon)` without `set` argument targets icons from different set files
120
+
- If you change the file path of an icon set from one SiteAccess to another, `ibexa_icon_path(icon, set)` with the same `set` argument targets icons from different set files
121
+
122
+
The built-in default icon set is `ids-assets` (corresponding to `/bundles/ibexaadminuiassets/vendors/ids-assets/dist/img/all-icons.svg`).
123
+
To see the icons available in this set, see [the icon reference](icon_twig_functions.md#icons-reference).
0 commit comments