diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-layout/workspace-layout.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-layout/workspace-layout.element.ts index e1139063e6..a03fece328 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-layout/workspace-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/workspace/workspace-layout/workspace-layout.element.ts @@ -148,27 +148,10 @@ export class UmbWorkspaceLayout extends UmbLitElement { ${this.#renderViews()} - - { - this._routerPath = event.target.absoluteRouterPath; - }} - @change=${(event: UmbRouterSlotChangeEvent) => { - this._activePath = event.target.localActiveViewPath; - }}> - + ${this.#renderRoutes()} - - - extension.meta.workspaces.includes(this.alias)} - default-element="umb-workspace-action"> - + ${this.#renderWorkspaceActions()} `; @@ -197,6 +180,34 @@ export class UmbWorkspaceLayout extends UmbLitElement { : nothing} `; } + + #renderRoutes() { + return html` + ${this._routes.length > 0 + ? html` + { + this._routerPath = event.target.absoluteRouterPath; + }} + @change=${(event: UmbRouterSlotChangeEvent) => { + this._activePath = event.target.localActiveViewPath; + }}> + ` + : nothing} + `; + } + + #renderWorkspaceActions() { + return html` + extension.meta.workspaces.includes(this.alias)} + default-element="umb-workspace-action"> + `; + } } declare global {