From 5abf3d9041243a0a0d88cec7d5ef7bfb339a2df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 28 Feb 2024 08:01:06 +0100 Subject: [PATCH] redirect controller for partial view --- .../workspace/partial-view-workspace.element.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.element.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.element.ts index cab1da5fba..b1b9ddd031 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/workspace/partial-view-workspace.element.ts @@ -22,6 +22,12 @@ export class UmbPartialViewWorkspaceElement extends UmbLitElement { const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique; const snippetId = info.match.params.snippetId; await this.#onCreate(parentUnique, snippetId); + + new UmbWorkspaceIsNewRedirectController( + this, + this.#workspaceContext, + this.shadowRoot!.querySelector('umb-router-slot')!, + ); }, }, { @@ -30,6 +36,12 @@ export class UmbPartialViewWorkspaceElement extends UmbLitElement { setup: async (component: PageComponent, info: IRoutingInfo) => { const parentUnique = info.match.params.parentUnique === 'null' ? null : info.match.params.parentUnique; await this.#onCreate(parentUnique); + + new UmbWorkspaceIsNewRedirectController( + this, + this.#workspaceContext, + this.shadowRoot!.querySelector('umb-router-slot')!, + ); }, }, {