Fixes link to workspace root from breadcrumb trail.
This commit is contained in:
@@ -78,7 +78,13 @@ export class UmbWorkspaceBreadcrumbElement extends UmbLitElement {
|
||||
|
||||
#getHref(structureItem: UmbStructureItemModel) {
|
||||
if (structureItem.isFolder) return undefined;
|
||||
return `section/${this.#sectionContext?.getPathname()}/workspace/${structureItem.entityType}/edit/${structureItem.unique}`;
|
||||
|
||||
let href = `section/${this.#sectionContext?.getPathname()}`;
|
||||
if (structureItem.unique) {
|
||||
href += `/workspace/${structureItem.entityType}/edit/${structureItem.unique}`;
|
||||
}
|
||||
|
||||
return href;
|
||||
}
|
||||
|
||||
override render() {
|
||||
|
||||
@@ -115,8 +115,13 @@ export class UmbWorkspaceVariantMenuBreadcrumbElement extends UmbLitElement {
|
||||
|
||||
#getHref(structureItem: any) {
|
||||
if (structureItem.isFolder) return undefined;
|
||||
const workspaceBasePath = `section/${this.#sectionContext?.getPathname()}/workspace/${structureItem.entityType}/edit`;
|
||||
return `${workspaceBasePath}/${structureItem.unique}/${this._workspaceActiveVariantId?.toCultureString()}`;
|
||||
|
||||
let href = `section/${this.#sectionContext?.getPathname()}`;
|
||||
if (structureItem.unique) {
|
||||
href += `/workspace/${structureItem.entityType}/edit/${structureItem.unique}/${this._workspaceActiveVariantId?.toCultureString()}`;
|
||||
}
|
||||
|
||||
return href;
|
||||
}
|
||||
|
||||
override render() {
|
||||
|
||||
Reference in New Issue
Block a user