Skip to content

Comments

add annotations documentation and examples#2054

Merged
MrTango merged 3 commits intoplone:6.0from
MrTango:patch_annotations
Feb 18, 2026
Merged

add annotations documentation and examples#2054
MrTango merged 3 commits intoplone:6.0from
MrTango:patch_annotations

Conversation

@MrTango
Copy link
Contributor

@MrTango MrTango commented Feb 13, 2026

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/

Added updated annotations docs with examples.
@github-project-automation github-project-automation bot moved this from New to Approved in Plone Documentation Feb 16, 2026
@MrTango MrTango enabled auto-merge February 18, 2026 13:37
@MrTango MrTango merged commit 1ae4d1c into plone:6.0 Feb 18, 2026
1 of 2 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in Plone Documentation Feb 18, 2026
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this

- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also image scales


## HTTP request example

Store cached values on an HTTP request during the lifecycle of a single request.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thing I learned today! (or maybe just forgot for a decade)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants