Skip to content

Commit 3325367

Browse files
committed
Improve meta information.
Spell out ZCML in its first appearance. Add links to issue for todo. Add introductory text to naked section headings.
1 parent ba3ae2d commit 3325367

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/classic-ui/layers.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ myst:
33
html_meta:
44
"description": "Layers allow you to enable and disable views and other site functionality based on installed add-ons and themes."
55
"property=og:description": "Layers allow you to enable and disable views and other site functionality based on installed add-ons and themes."
6-
"property=og:title": "Layers"
7-
"keywords": "layer, layers,browser layer, views, viewlets, portlets"
6+
"property=og:title": "Layers in Plone 6"
7+
"keywords": "layer, layers, browser layer, views, viewlets, portlets"
88
---
99

1010
(classic-ui-layers-label)=
@@ -18,7 +18,7 @@ Layers are useful in the following scenarios.
1818
- Mobile browsing code is only active when the site is being browsed on a mobile phone.
1919

2020
Layers are marker interfaces applied to the {term}`HTTPRequest` object.
21-
They are usually used in conjunction with {term}`ZCML` directives to dynamically activate various parts of the configuration, such as theme files or add-on product functionality.
21+
They are usually used in conjunction with Zope Configuration Mark-up Language ({term}`ZCML`) directives to dynamically activate various parts of the configuration, such as theme files or add-on product functionality.
2222

2323
Layers ensure that only one add-on product can override the specific Plone instance functionality in your site at a time, while still allowing you to have possibly conflicting add-on products in your buildout and ZCML.
2424
Multiple Plone site instances can share the same ZCML and code files.
@@ -61,13 +61,17 @@ If you want to override a view or a viewlet unconditionally for all sites withou
6161

6262
```{todo}
6363
Explain how to use an `overrides.zcml`.
64+
65+
See https://github.com/plone/documentation/issues/1426
6466
```
6567

6668

6769
(classic-ui-creating-a-layer-label)=
6870

6971
## Creating a layer
7072

73+
Developers can create layers for themes, extensions, behaviors, and other functions.
74+
7175

7276
(classic-ui-theme-layer-label)=
7377

@@ -204,9 +208,9 @@ from zope.publisher.interfaces.browser import IBrowserRequest
204208

205209
class INoHeaderLayer(IBrowserRequest):
206210
""" When applied to HTTP request object, header animations
207-
or images are not rendered on this.
211+
or images are not rendered on this layer.
208212
209-
If this layer is on request, do not render header images.
213+
If this layer is on a request, do not render header images.
210214
This allows uncluttered editing of header animations and images.
211215
"""
212216

@@ -245,6 +249,8 @@ class EditHeaderAnimationsView(FormWrapper):
245249

246250
## Checking active layers
247251

252+
This section describes a few strategies for developers to check active layers according to their type.
253+
248254

249255
(classic-ui-layers-are-activated-on-the-current-request-object-label)=
250256

@@ -302,7 +308,7 @@ Layers are evaluated from zero index (highest priority) to the last index (lowes
302308

303309
(classic-ui-testing-layers-label)=
304310

305-
## Testing Layers
311+
## Testing layers
306312

307313
Plone testing tool kits will not register layers for you.
308314
You have to do it yourself somewhere in the boilerplate code, as shown in the following example.

0 commit comments

Comments
 (0)