Skip to content

Commit

Permalink
Merge pull request #184 from plone/summary-fields
Browse files Browse the repository at this point in the history
Add more summary fields for rendering listings
  • Loading branch information
davisagli authored Feb 10, 2025
2 parents d4593a5 + 9e1d919 commit 2cb0c9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/184.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include `effective`, `end`, `getObjSize`, `mime_type`, and `start` in default summary serialization. @davisagli
8 changes: 8 additions & 0 deletions src/plone/volto/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
@implementer(IJSONSummarySerializerMetadata)
class JSONSummarySerializerMetadata:
def default_metadata_fields(self):
# Fields to include in the default catalog-based summary
# serialization in plone.restapi. We try to include everything
# needed to render useful listings/teasers.
return {
"head_title",
"effective",
"end",
"getObjSize",
"image_field",
"image_scales",
"mime_type",
"nav_title",
"start",
}

0 comments on commit 2cb0c9a

Please sign in to comment.