add annotations documentation and examples#2054
Merged
Conversation
Added updated annotations docs with examples.
This was referenced Feb 13, 2026
Closed
petschki
approved these changes
Feb 16, 2026
davisagli
reviewed
Feb 19, 2026
| - Storing behavior data from `plone.behavior` package | ||
| - Caching values on HTTP request objects (`plone.memoize` cache decorators) | ||
| - Storing settings information on the portal or content objects (various add-on products) | ||
| - Assigned portlets and their settings |
|
|
||
| ## HTTP request example | ||
|
|
||
| Store cached values on an HTTP request during the lifecycle of a single request. |
Member
There was a problem hiding this comment.
I don't see the benefit of this compared to just adding a key in request.other
| By default, annotations store: | ||
|
|
||
| - Behavior data from `plone.behavior` package | ||
| - Assigned portlets and their settings |
Member
There was a problem hiding this comment.
This seems to incompletely repeat information from above
| /> | ||
| ``` | ||
|
|
||
| The `AnnotationStorage` factory automatically stores field values in annotations, using the behavior interface's identifier as the annotation key. |
Member
There was a problem hiding this comment.
Hey, thing I learned today! (or maybe just forgot for a decade)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added updated annotations docs with examples.
The annotations docs are generated updated docs taken from existing Plone 5 docs. Archetypes references are replaced with DX and code updated to Python 3.
Addresses todo item here: #1882
📚 Documentation preview 📚: https://plone6--2054.org.readthedocs.build/