How to change the label for a record name

Task Description

This document describes how to change the text label for a record name: the name for a record that appears at the top of the record's page (e.g. Cataloging, Acquisitions, Storage Location ...) and on various other web pages across your CollectionSpace system.

This is a display-only change. Changing the text label that appears at the top of a record on CollectionSpace's web pages doesn't actually rename the record. Stated another way: it does not change the underlying name of the record that appears in configuration files, in reporting, in data import and export, etc.

By following a similar process, you can change nearly all of the labels on any of CollectionSpace's pages.

Prerequisites

This work requires knowledge of how to:

  • Make new directories, copy files, and perform similar tasks in your operating system.
  • Run commands at your operating system's command prompt.
  • Edit text files.

Also helpful is:

  • Familiarity with reading HTML markup.

In addition, if you have not already done so:

Layers involved

To carry out this task, you will need to make changes in the following CollectionSpace layer(s):

  • User Interface (UI)

Procedure

Find your tenant folder

 Click here to read these instructions (included in many documents on this site) ...
Unknown macro: {multi-excerpt-include}

(Or instead see Finding your tenant folder.)

Find the message bundle file for your tenant

  • Within your tenant folder, find the bundle/core-messages.properties-overlay file.
    • If this file and/or folder doesn't exist:
      • If needed, create a new folder within your tenant folder, named bundle
      • Create a new text file within the bundle folder, named core-messages.properties-overlay

After following these steps, you will then have this folder/file structure within the UI layer source code folder, inside the src/main/webapp/tenants folder:

 

Edit the message bundle file for your tenant

  • Edit the core-messages.properties-overlay file in a text editor.
  • Create or edit the text labels for the relevant record(s).

There are multiple labels that reference the name of a record. An example: if you wanted to rename the "Object Exit" procedural record (perhaps to "Deaccession" or "Disposition of Property" or another procedural name preferred by your museum), you might need to override at least five text labels pertinent to that record.

The following labels are contained in the default message bundle file, src/main/webapp/defaults/bundle/core-messages.properties, in the source code tree for CollectionSpace's UI layer:

 

In your core-messages.properties-overlay file in your tenant folder, within that UI source code tree, you would create copies of each of these text labels, changing their values, in order to override the defaults. For example:

 

See The message bundle file in the UI layer for detailed instructions on how to find and edit the relevant labels.

Copy your changes to the CollectionSpace server

 Click here to read these instructions (included in many documents on this site) ...
Unknown macro: {multi-excerpt-include}

(Or instead see Configuring CollectionSpace's User Interface (UI) Layer - An Overview.)

Test

After following the procedure above, use a web browser for the following steps:

  • First, clear your Web browser's caches.
  • If you are not already logged into your museum (tenant) on your CollectionSpace system:
  • Navigate to the page containing your change.
  • Inspect the text labels on the relevant record's page, and on any secondary pages also mentioning the record.

If it doesn't work

Expand as needed on the following bullet points, which are currently just telegraphic reminders:

If you don't find your label in the message bundle file:

  • Open the HTML template file for the relevant page, and find the class="" selector for the relevant record in that template.
  • Add a new line to the message bundle file, where the property value (to the left of the ":") will be ...

If the label change doesn't appear, make sure that:

  • You've reloaded the relevant page in your web browser to see your changes.
  • You've edited the correct file.
  • In that file, you've changed the labels associated with the correct record. In addition to double-checking your editing, you can also open the HTML template file for the relevant page(s), and verify that the property value of the label you've changed closely matches the class="" selectors pertinent to that record in that template.
  • You've copied (deployed) the changes in your tenant folder to your CollectionSpace server.
  • You've either restarted the cspace server or set up your server to automatically reflect changes right after they're deployed.

See Also

These links may require updating.