Manage multiple websites

2025/08/11 9:02 AM

I've been reading the documentation round hosting multiple websites within the same Xperience instance, and it makes sense mostly.

It describes how to structure the web project with RCLs for each website, but I don't think it really goes into too much detail about how the right RCL would be picked up per website? I can see how it might work for publishing, you can publish the shared RCL, the channel specific RCL (and ignore the other channel's RCL), and do it like that. But how does that work locally?

The alternative if no shared logic/components is needed, would be fully separate solutions. But then you lose out on the reusability.

I think it would be great if there was a working example in GitHub to showcase an example setup.

Tags:
Website channels

Answers

2025/08/12 2:56 PM

There's an open-source example prepared by our senior support special Eric over on his GitHub account.

https://github.com/kentico-ericd/xperience-multichannel-sample

There isn't any magic in setting these things up - you still need to explicitly assign different widgets to your <editable-area> widget restrictions, map page template controllers to specific channels, and use the right component code in the right _Layout.cshtml or templates Razor views.

The biggest difference between an application with 1 set of components and assets managed directly in a single ASP.NET Core project and an application that consumes multiple libraries with separate components is the code organization. You are separating the components and services for the benefit of the team - everything still gets deployed together.


As a side note, I don't usually use the term RCL (Razor class library) because it makes it seem like you can only put Razor code in it.

In fact every RCL is just a regular .NET library with the addition of some MSBuild and ASP.NET Core specific configuration and you can put anything in it, like service classes, tag helpers, view components, Razor components (for the Email Builder), static assets, or .resx files for localization. Then you consume it in your application following the ASP.NET Core documentation.

To answer this question, you have to login first.