@@ -15,6 +15,7 @@ We often want to ship a website with a static resource, such as an image, icon,
1515For this, we need to register static resources.
1616
1717
18+ (classic-ui-static-resources-registering-label)=
1819## Registering javascript and css
1920
2021To register a static resource in Plone 6, we need to use the ` plone.base.interfaces.resources.IBundleRegistry ` interface.
@@ -36,21 +37,6 @@ The js files have to be in the `browser/static` folder of your Plone 6 project.
3637
3738You can register a CSS resource in the same way.
3839
39- ``` xml
40- <registry >
41- <records interface =" plone.base.interfaces.resources.IBundleRegistry" prefix =" plone.bundles/css" >
42- <value key =" enabled" >True</value >
43- <value key =" csscompilation" >++plone++myproject.site/style.min.css</value >
44- <value key =" jscompilation" >++plone++myproject.site/javascript.min.js</value >
45- <value key =" load_async" >False</value >
46- <value key =" load_defer" >False</value >
47- <value key =" depends" >plone</value >
48- </records >
49- </registry >
50- ```
51-
52- Registering a js file and a css file in the same bundle is also possible.
53-
5440``` xml
5541 <registry >
5642 <records interface =" plone.base.interfaces.resources.IBundleRegistry" prefix =" plone.bundles/css" >
@@ -61,6 +47,20 @@ Registering a js file and a css file in the same bundle is also possible.
6147 </registry >
6248```
6349
50+ Registering a js file and a css file in the same bundle is also possible.
51+
52+ ``` xml
53+ <registry >
54+ <records interface =" plone.base.interfaces.resources.IBundleRegistry" prefix =" plone.bundles/css" >
55+ <value key =" enabled" >True</value >
56+ <value key =" csscompilation" >++plone++myproject.site/style.min.css</value >
57+ <value key =" jscompilation" >++plone++myproject.site/javascript.min.js</value >
58+ <value key =" load_async" >False</value >
59+ <value key =" load_defer" >False</value >
60+ <value key =" depends" >plone</value >
61+ </records >
62+ </registry >
63+ ```
6464
6565(classic-ui-static-resources-available-attributeslabel)=
6666
0 commit comments