Open Closed

One application (Admin and public in one) CMS setup? #6885


User avatar
0
Sturla created

Is it possible to have one running application that has

  • both the admin and public functionality in one place (not backend/frontend application)?

Something like:

  • Tenants would control the CMS (when logged in) (www.tenant.domain.com)
    • Not logged in users would see the result (blog/pages/menus/etc)
  • Host admin have CMS for the host domain ((www.domain.com)
    • plush would be that the host could create menu items that would apply for all tenants

Tenant could create a Blog page like this

and view it like this on the same application, not having to have another application instance (public web)?

It is cheaper and easier to have it all in one solution.

p.s I tried this in Blazor Server.. is that maybe not supported? And if so are there any other restrictions or limitations for Blazor?

e.s I tried this also with MVC and had some different strangeness https://support.abp.io/QA/Questions/6711/Bugs--Issues-v81x#answer-3a115a09-806f-bf69-6f41-319509df51ef

Abp.io Blazor Server 8.0.5


5 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi,

    • CMS Kit public side is implemented in MVC only because of SEO capabilities.

    • CMS Kit is not designed for this. The entities of CMS Kit are multi-tenant and they can be managed separately for each tenant.

    You can override the following sections to make it fit to your conditions:

    Probably you're familiar with this but if you struggle in any topic you can follow Overriding Services steps to override services in your application.

    1. Menu items are added in here: https://github.com/abpframework/abp/blob/73cd37f06717d1f920d224e00c1e4380a1244cf3/modules/cms-kit/src/Volo.CmsKit.Public.Web/Menus/CmsKitPublicMenuContributor.cs#L32-L41 But as a better single-point approach you can override MenuItemPublicAppService and add Host menu items always. https://github.com/abpframework/abp/blob/73cd37f06717d1f920d224e00c1e4380a1244cf3/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Menus/MenuItemPublicAppService.cs#L40

    2. Even you show menu items from host, CMS Kit pages or blog post won't be opened, you should override PagePublicAppService and modify logic and make it includes Host entities too: https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Pages/PagePublicAppService.cs

    3. And same for BlogPostPublicAppService https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs

    You can use Disabling Data Filters feature for disabling IMultiTenant feature in the queries.


  • User Avatar
    0
    Sturla created

    Thanks for the reply. Very informative.

    CMS Kit public side is implemented in MVC only because of SEO capabilities.

    Will you implement this in Blazor server https://github.com/abpframework/abp/issues/18289 (and if now, when?) or is my only change of having one application running using MVC?

    CMS Kit is not designed for this.

    Maybe the easier way is to have two applications.. one for my product/landing and one for all the subdomains tenants using the same database. I will explore this a bit further and try out your suggestions.

    I´m just trying to figure out how to have the lowest operational cost while not complicating anything. I´m e.g. aiming on using Azure Container Apps (managed kubernetes).

  • User Avatar
    0
    Sturla created

    @enisin

    CMS Kit public side is implemented in MVC only because of SEO capabilities. Will you implement this in Blazor server https://github.com/abpframework/abp/issues/18289 (and if now, when?) or is my only change of having one application running using MVC?

    Will the new Blazor SSR not have the CMS Kit public side functionality since you plan to add SEO https://github.com/abpframework/abp/issues/16342#issuecomment-1997078207 ? Any eta for it?

    I need to know if my only (none Angular/React) option is then to use MVC, if Im starting something new for the next 3 months?

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Currently we don't have a clear plan to implement Blazor SSR for CMS Kit Public side. We'll wait and see how the new Blazor Web App framework goes, than we decide. As we can see, even Microsoft makes it the default framework in the documentations, probably it'll be a fundamental option for web development in the future of Asp.Net Core. But we'll see in time.

    But for SEO enhancements, we planned that issue but haven't started working on yet, I'll inform you when it's clear but it won't be included in v8.1 for sure.

  • User Avatar
    0
    Sturla created

    Yes I thought so. I’m, my self, on the fence with Blazor (to be used for everything) so I will just use it for the backend for me and my tenants to manage things but will use MVC as the public facing front.

    So two applications at this point and if/when Blazor SSR will contain all the bits I can considder having one.

    P.s Sorry I mixed the SEO bit into this. That was just for the CMS blog part and isnt related to Blazor in any way. 😅 BUT for my idea to work I need that part so I look forware hearing from you.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11