Skip to content

PLIP: allow custom caption in relation behaviorΒ #2979

@mtrebron

Description

@mtrebron

PLIP (Plone Improvement Proposal)

When a plone.app.relation field is added as a behavior to a content type, it will display with a fixed caption "Related content" above the items. It would be useful for a content manager to be able to customize this text, depending on the context in which it is presented e.g. "Favorite authors" or "Suggested articles"

This can be achieved by adding a second field to the behavior which may be used to optionally override the default text. The proposed change also includes updating the plone.belowcontentbody.relateditems viewlet provided by plone.app.layout

Overall, this change would improve consistency between similar behaviors (e.g. the ILeadImageBehavior in plone.app.contenttypes)

Responsible Persons

Proposer: Norbert Marrale

Seconder: your name here

Abstract

Add a customizable caption field to relations

Motivation

In our use case, relations can be displayed outside of their direct context (e.g. in a mega-menu). By allowing the caption to be customized, a better indication can be given of what is being presented.

Assumptions

The caption field would be optional, and existing relations which do not use the field mantain their current functionality.

Proposal & Implementation

I have cloned both affected packages and am working on an implementation for Plone 5.2

Deliverables

New text field, updated view.

Risks

None

Participants

@mtrebron

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Stalled (approved but inactive)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions