Skip to content

Commit

Permalink
Used resource title instead of resource type in page title.
Browse files Browse the repository at this point in the history
  • Loading branch information
Faakhir30 committed Oct 13, 2024
1 parent b79ef9d commit 4a335b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/volto/news/6308.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Used `resource title` instead of `resource type` in page title on edit. @Faakhir30
17 changes: 12 additions & 5 deletions packages/volto/src/components/manage/Edit/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ import config from '@plone/volto/registry';

const messages = defineMessages({
edit: {
id: 'Edit {title}',
defaultMessage: 'Edit {title}',
id: 'Edit - {title}',
defaultMessage: 'Edit - {title}',
},
save: {
id: 'Save',
Expand Down Expand Up @@ -346,11 +346,18 @@ class Edit extends Component {
<>
<Helmet
title={
this.props?.schema?.title
this.props?.content?.['@components']?.breadcrumbs?.items
?.length > 0
? this.props.intl.formatMessage(messages.edit, {
title: this.props.schema.title,
title:
this.props?.content?.['@components']?.breadcrumbs
?.items[0]?.title,
})
: null
: this.props?.schema?.title
? this.props.intl.formatMessage(messages.edit, {
title: this.props.schema.title,
})
: null
}
>
{this.props.content?.language && (
Expand Down

0 comments on commit 4a335b8

Please sign in to comment.