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
The icons above are made available as Plone resources.
50
+
For example, the icon registered as `lightning` (in XML with prefix full name is `plone.icon.lighting`) resource path is `++plone++bootstrap-icons/lightning.svg`.
51
+
One could register another icon set under a new name, for example `++plone++fontawesome-icons`, and override the registrations above to use them.
43
52
44
53
45
54
(classic-ui-icons-contextual-icons-label)=
46
55
47
56
## Contextual Icons
48
57
49
-
We can define contextual icons to be used in specific places in a website while preserving the default system icons to be used elsewhere throughout the site.
50
-
To use a different icon than the system default, you would override it without touching the system icon.
51
-
52
-
You should avoid replacing system icons because it may result in an inconsistent user interface.
53
-
54
-
The specific icon name is based on the usage in the system.
55
-
For example the copy icon is named `plone.icon.plone-copy`.
58
+
Plone defines contextual icons, which are used in specific places in a website.
59
+
For example we have an icon registered under the name `plone.icon.plone-copy` in https://github.com/plone/plone.staticresources/blob/master/src/plone/staticresources/profiles/default/registry/icons_plone.xml which points to the bootstrap `clipboard-plus` icon `++plone++bootstrap-icons/clipboard-plus.svg`.
60
+
To use a different icon than the system default, you can override the registration for `plone.icon.plone-copy` with another icon path.
56
61
57
62
58
63
(classic-ui-icons-icon-expression-label)=
59
64
60
65
## Icon expression
61
66
62
-
- The field `icon_expression` is used again to define icons for actions, contenttypes, and other purposes.
63
-
- Use the icon name for icon expressions.
64
-
65
-
66
-
(classic-ui-icons-customization-label)=
67
-
68
-
## Customization
69
-
70
-
```{todo}
71
-
Add content for this section
72
-
```
73
-
74
-
- Add custom icons
75
-
- Override some of the icons
76
-
77
-
78
-
(classic-ui-icons-icon-font-label)=
79
-
80
-
## Icon font
81
-
82
67
```{todo}
83
-
Add content for this section
68
+
How does this work? We need an example here!
84
69
```
85
70
86
-
-Set up a profile to install the icon font.
87
-
- Use Font Awesome as an example.
71
+
-The field `icon_expression` is used again to define icons for actions, contenttypes, and other purposes.
72
+
- Use the icon name for icon expressions.
88
73
89
74
90
75
(classic-ui-icons-iconresolver-label)=
91
76
92
77
## Iconresolver
93
78
94
-
```{todo}
95
-
What is `iconresolver`?
96
-
Add to Glossary.
79
+
The iconresolver take's an icon name (without the `plone.icon.` prefix) like `plone-copy` or `align-center` and resolves it to an actual icon.
The iconresolver can be used via URL or via Python as shown in section {ref}`classic-ui-icons-iconresolver-get-icon-url-label` and {ref}`classic-ui-icons-iconresolver-get-icon-tag-label`.
[Mockup](https://github.com/plone/mockup) provides an `iconResolver` function, defined in `core/utils.js`, which does this the same way and has a fallback for demo and testing.
126
142
127
-
### Resource Path
128
143
129
-
SVG files are available from the resource path.
130
-
For example, the lightning icon's resource path is `++plone++bootstrap-icons/lightning.svg`.
0 commit comments