Unreleased Documentation

This documentation is unreleased and still in development. It may describe features which are not yet released in DSpace.
Looking for another version? See all documentation

DSpace 10 allows you to edit the content displayed on the website in the following sections:

  1. Home Header:
  2. Home News:
  3. Top Footer:

Access to the Functionality

CMS metadata editing can be accessed using the admin sidebar:

This menu entry is configurable with an i18n label on the Angular side. The key is: menu.section.edit-cms-metadata.

Functionality Overview

The CMS Metadata edit functionality allows for editing content in DSpace without changing the source code.

Markdown Support

CMS Metadata Edit functionality supports Markdown.

However, in order for it to display properly, you need to enable it by enabling the following setting in your config.yml file:

markdown:
  enabled: true


The edit website allows you to specify the content for each language declared in your languages section in your config.yml configuration file.

Upon initial visit the page will allow you to specify the CMS metadata that you wish to edit:

Click the Select metadata to edit selector will display editable metadata.

Footer Content

Since the top footer content can only be edited via CMS metadata edit functionality if it's enabled, you need to change the following configuration in config.yml for it to display properly:

homePage:
  # Whether to show the top footer section or not
  showTopFooter: true

Otherwise you will not see the metadata for the footer in the dropdown.

Metadata Schema

Editable metadata can be changed in the frontend config.yml configuration file under the following:

cms:
  metadataList: [
	'metadata1',
	'metadata2',
	'etc...'
  ]

Then these metadata values will be saved on the main Site object in the database. Because of this, you can then use the metadata key in the source code by pulling the metadata of the Site object, similar to the following:

this.site$ = this.route.data.pipe(
  map((data) => data.site as Site),
);

this.homeHeaderMetadataValue$ = combineLatest({
  site: this.site$,
  language: this.locale.getCurrentLanguageCode(),
}).pipe(
  take(1),
  map(({ site, language }) => site?.firstMetadataValue('your.metadata.key', { language })),
);

By default, DSpace 10 defines the following metadata keys:

  1. dspace.cms.home-header - for the Home Header panel.
  2. dspace.cms.home-news - for the Home News panel
  3. dspace.cms.footer - for the Footer panel

You can inspect how they are used and change the hard-coded metadata keys in the .ts and .html files of those components:

  1. Home Header: home-page.component.ts + home-page.component.html (ds-base-home-page selector)
  2. Home News: home-news.component.ts + home-news.component.html (ds-base-home-news selector)
  3. Footer: footer.component.ts + footer.component.html (ds-base-footer selector)
  • No labels