From 4cfcfc11b671058375f4bc98d8f20a6fc5afded2 Mon Sep 17 00:00:00 2001 From: Sijmen Koffeman Date: Fri, 4 Oct 2024 17:10:35 +0100 Subject: [PATCH 1/3] Update README.md Added extra instructions and explanations about how to avoid issues with oc features and blazor routing (which did pose problems to some users) --- src/docs/guides/create-blazor-cms/README.md | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/src/docs/guides/create-blazor-cms/README.md b/src/docs/guides/create-blazor-cms/README.md index 51dce873cb8..1d16241922c 100644 --- a/src/docs/guides/create-blazor-cms/README.md +++ b/src/docs/guides/create-blazor-cms/README.md @@ -730,6 +730,51 @@ Run the application. Click on the `Orchard Core` link on the Left Nav will load # Add multitenancy to the Blazor App One of the key features of Orchard Core is its multi-tenancy support. In this section, we will add multi-tenancy support to our Blazor application. +> !!! NOTE +> +> Orchard Core listens for requests, also on '/' (e.g. when a site needs to be configured). So having our Blazor app listening to '/' as well, can pose a problem. +> A solution is to replace `@page "/"` with `@page "/home"` in our `home.razor` file (and update our `navmenu.razor`), so Blazor (the app) will listen to `/home` while Orchard Core is not hindered by that. + +=== "Home.razor" + + ```razor + @page "/home" + + Home + +

Hello, Orchard!

+ + Welcome to your new Blazor CMS app. + ``` + +=== "NavMenu.razor" + + ```razor + + + + + + ``` + ## Enable the tenant feature. In orchard core admin, go to `Configuration` -> `Features` and enable the `Tenants` feature. @@ -985,4 +1030,4 @@ To further verify that there is now an active SignalR connection with the server In this guide, we have seen how to create a Blazor application, in a Razor class library, and serve it from an Orchard Core CMS application. We have seen how to add multi-tenancy support to the Blazor application, and how to make the Blazor application interactive. -The source code for this guide is available at [github.com/OrchardCMS/OrchardCore.Samples](https://github.com/OrchardCMS/OrchardCore.Samples) \ No newline at end of file +The source code for this guide is available at [github.com/OrchardCMS/OrchardCore.Samples](https://github.com/OrchardCMS/OrchardCore.Samples) From 60c4bc03dfa97e9e4f9eaec2c2fe81881b125bb5 Mon Sep 17 00:00:00 2001 From: Sijmen Koffeman Date: Fri, 4 Oct 2024 17:45:59 +0100 Subject: [PATCH 2/3] Update src/docs/guides/create-blazor-cms/README.md Co-authored-by: Hisham Bin Ateya --- src/docs/guides/create-blazor-cms/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/guides/create-blazor-cms/README.md b/src/docs/guides/create-blazor-cms/README.md index 1d16241922c..bd14f25ce69 100644 --- a/src/docs/guides/create-blazor-cms/README.md +++ b/src/docs/guides/create-blazor-cms/README.md @@ -732,7 +732,7 @@ One of the key features of Orchard Core is its multi-tenancy support. In this se > !!! NOTE > -> Orchard Core listens for requests, also on '/' (e.g. when a site needs to be configured). So having our Blazor app listening to '/' as well, can pose a problem. +> Orchard Core listens for requests, also on '/' (e.g. when a site needs to be configured). So having our Blazor app listening to '/' as well can pose a problem. > A solution is to replace `@page "/"` with `@page "/home"` in our `home.razor` file (and update our `navmenu.razor`), so Blazor (the app) will listen to `/home` while Orchard Core is not hindered by that. === "Home.razor" From c0ff0d9e72e62207801da2364bb6c836380892ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Fri, 4 Oct 2024 19:38:27 +0200 Subject: [PATCH 3/3] Fix admonition syntax --- src/docs/guides/create-blazor-cms/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/docs/guides/create-blazor-cms/README.md b/src/docs/guides/create-blazor-cms/README.md index bd14f25ce69..35e40e3280e 100644 --- a/src/docs/guides/create-blazor-cms/README.md +++ b/src/docs/guides/create-blazor-cms/README.md @@ -730,10 +730,9 @@ Run the application. Click on the `Orchard Core` link on the Left Nav will load # Add multitenancy to the Blazor App One of the key features of Orchard Core is its multi-tenancy support. In this section, we will add multi-tenancy support to our Blazor application. -> !!! NOTE -> -> Orchard Core listens for requests, also on '/' (e.g. when a site needs to be configured). So having our Blazor app listening to '/' as well can pose a problem. -> A solution is to replace `@page "/"` with `@page "/home"` in our `home.razor` file (and update our `navmenu.razor`), so Blazor (the app) will listen to `/home` while Orchard Core is not hindered by that. +!!! note + Orchard Core listens for requests, also on '/' (e.g. when a site needs to be configured). So having our Blazor app listening to '/' as well can pose a problem. + A solution is to replace `@page "/"` with `@page "/home"` in our `home.razor` file (and update our `navmenu.razor`), so Blazor (the app) will listen to `/home` while Orchard Core is not hindered by that. === "Home.razor"