diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.resolver.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.resolver.ts index 7ceb3ba6c..656d0528c 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.resolver.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.resolver.ts @@ -168,8 +168,7 @@ export class DescriptionEditorResolver extends BaseEditorResolver { } else if (dmpId != null && dmpSectionId != null && copyDmpId == null) { return this.dmpService.getSingle(Guid.parse(dmpId), DescriptionEditorResolver.dmpLookupFields()) .pipe(tap(x => { - this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label); - this.breadcrumbService.addIdResolvedValue(dmpSectionId, this.language.instant("DESCRIPTION-EDITOR.TITLE-NEW")); + this.breadcrumbService.addIdResolvedValue(`${x.id}/${dmpSectionId}`, this.language.instant("DESCRIPTION-EDITOR.TITLE-NEW")); }), takeUntil(this._destroyed), map(dmp => { diff --git a/dmp-frontend/src/app/ui/misc/breadcrumb/navigation-breadcrumb.component.ts b/dmp-frontend/src/app/ui/misc/breadcrumb/navigation-breadcrumb.component.ts index c4ee00eba..5c70231c5 100644 --- a/dmp-frontend/src/app/ui/misc/breadcrumb/navigation-breadcrumb.component.ts +++ b/dmp-frontend/src/app/ui/misc/breadcrumb/navigation-breadcrumb.component.ts @@ -144,6 +144,16 @@ export class NavigationBreadcrumbComponent extends BaseComponent { } + // replace whole pathParams + const paramText = Object.keys(pathParams) + .map(key => pathParams[key]) + .join('/'); + + if (this.paramToStringDictionary[paramText]) { + return [this.paramToStringDictionary[paramText], null]; + } + + // replace path params segments const title = Object.keys(pathParams) .sort((a, b) => b.length - a.length) // avoid param overlapping => :id2 (length 3) should be replaced before :id (length 2) .reduce(