diff --git a/scripts/metadata-html-builder.js b/scripts/metadata-html-builder.js index 8ae18086..92da6528 100644 --- a/scripts/metadata-html-builder.js +++ b/scripts/metadata-html-builder.js @@ -139,6 +139,12 @@ export async function fetchMetadataAndCreateHTML(metadataViewConfig, assetData, if (assetData === undefined || assetJSON === undefined) { assetJSON = await getAssetMetadata(getAssetIdFromURL()); } + // Remove "urn:aaid:aem:" prefix from displayed 'assetId' value + if (assetJSON.assetId) { + // A deep copy of the assetJSON object is created to avoid modifying the original object + assetJSON = JSON.parse(JSON.stringify(assetJSON)); + assetJSON.assetId = assetJSON.assetId.replace('urn:aaid:aem:', ''); + } const metadataContainer = document.createElement('div'); metadataContainer.classList.add('metadata-container'); diff --git a/scripts/metadata.js b/scripts/metadata.js index f9368c5a..ccc53b8b 100644 --- a/scripts/metadata.js +++ b/scripts/metadata.js @@ -12,6 +12,7 @@ import { fetchCached } from './fetch-util.js'; import { getBaseConfigPath, getMetadataConfigs } from './site-config.js'; const SEARCH_FIELD_TO_POLARIS_API_MAP = { + uuid: 'assetId', 'dc-format': 'repositoryMetadata.dc:format', 'repo-name': 'repositoryMetadata.repo:name', 'repo-createDate': 'repositoryMetadata.repo:createDate',