Skip to content

Commit dbacd96

Browse files
committed
Clean up recipes.md, adding labels
1 parent 589fee4 commit dbacd96

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/classic-ui/recipes.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1+
(classic-ui-recipes-label)=
2+
13
# Recipes
24

5+
This chapter provides several recipes to working with the Classic UI in Plone 6.
6+
37

8+
(classic-ui-recipes-add-custom-classes-to-body-label)=
49

510
## Add custom classes to the `body` element
611

7-
Body classes are generated in the `LayoutPolicy.bodyClass` method in module `plone.app.layout.globals.layout`.
8-
Contained is a feature to plugin in own body-classes using named adapters.
12+
Body classes are generated in the `LayoutPolicy.bodyClass` method in the module `plone.app.layout.globals.layout`.
13+
It allows you to create your own body-classes using named adapters.
914

10-
Create a class like so:
15+
First create a class as follows.
1116

12-
```Python
17+
```python
1318
from plone.app.layout.globals.interfaces import IBodyClassAdapter
1419

1520
@implementer(IBodyClassAdapter)
@@ -21,12 +26,11 @@ class CustomBodyClasses(object):
2126

2227
def get_classes(self, template, view):
2328
return ["additional-class", "another-css-class"]
24-
2529
```
2630

27-
Then register the adapter in ZCML:
31+
Then register the adapter in ZCML.
2832

29-
```XML
33+
```xml
3034
<adapter
3135
factory=".custombodyclasses.CustomBodyClasses"
3236
for="* *"

0 commit comments

Comments
 (0)