Open Closed

CMS questions before deciding on the correct route of architecture #8432


User avatar
0
Sturla created

I have few questions regarding the CSM.

I want to to pre-create different pages for tenants based on their needs. They will be offered a UI selections and then we will create the pages they need. I also want them to be able to create and edit these pages afterwards.

Question summary:

  1. Can I create complex pages like the image here below? I want to be able to do something that looks really nice https://abp.io/support/questions/6872/What-is-the-best-way-to-customize-look-and-feel-for-each-tenant. This is for both normal pages from menu but also the landing ("index.html") page it self.
  2. Can I add dynamic widgets into these pre-made pages?
  3. Can I intercept the "create page" button and offer my own popup UI for selecting a template?
  4. Can you edit the dynamic widget from the page its on by clicking on the widget on the page its self?

Same questions in more detail

Q1 Can I create complex pages like the image here below? And are the pages responsive?


Q2 Can I add dynamic widgets into these pre-made pages? I´m pretty sure it is but want to ask.


Q3 Can I intercept the "create page" button and offer my own popup UI for selecting a template? When clicking "+ New page" I want to intercept that and offer another UI showing a selection of different type of pages e.g. "Landing page", "Meet the team", "The product" etc..


Q4 Can you edit the dynamic widget from the page its on by clicking on the widget on the page its self? I would not want to go the the menu for it and I don´t want manual editing of text.

  • ABP Framework version: v9.0.1
  • UI Type: Blazor Server backend with MVC frontend
  • Database System: EF Core (SQL Server)

4 Answer(s)
  • User Avatar
    0
    Sturla created

    Hi @enisn

    I have tried to add more meat to this question for you. I hope this makes it easier for you to answer me.

    I´m trying to see how far I can go using CMS Kit without creating my own CMS 🙈!

    So the question is if I can use it with little or no custom code (except some Dynamic Widgets) OR do I have to extend it an do a complete custom extension build on top of it (is that even possible)? What are my best options?

    My requirements:

    • My tenants are creating sales pages for their product (just one product per domain). These pages can differ as much as the tenants are many.
    • Each tenant should be able to create rather complex pages, with different elements on them, just like you see on the image below
    • This applies to both the landing page (index.html) as other pages the tenant wants to create.
    • I´m not looking for a "WYSIWYG control everything" designer like Wix, but I would like some control and dynamic nature of page creation.

    Questions (contains the previous questions also)

    1. Can I create a complex pages by using CMS Kit out of the box or do I need to create custom page templates (that every tenant will have access to from "create page" button)?
    2. If I need to create custom template page, can CMS Kit manage the content for the page?
      • If I allow the tenant to change from a template with different content placeholders then the content would be lost.
    3. I would not want to share these themes between tenants because if one asks for a change (and many are using that template) I will have to make a copy of it (in code) and do the change. Thats not dynamic or flexable enough for my needs.
    4. Could a Dynamic Widget be used to create these "sections" of premade blocks (as seen on image below)? This would probably be the most ideal scenario. Then I would have a "Hero widget" a "Carousel widget" etc. that has different elements (text, images, placement of text, enable/disble etc.) that the user can change for that page. The only issue I see here is that the CMS menu will quickly fill up with many many widgets.
    5. Do the Dynamic Widgets open up in design/edit mode when I click on them (in the text field of CMS Kit) after they have been added as content? If I have complex widget then I would like my tenants to have a UI (that might have extra information in it)
    6. Can I intercept the "create page" button and offer my own popup UI for selecting a template?

    Just to include it here I asked this question, What is the best way to customize look and feel for each tenant? 6872, before but never did anything with it since it pointed to this Tenant-specific themes 5295 and I thought this was not quite what I needed 🤷‍♂️

    I started thinking about these things 2022 and see that some have been updated but not all.

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Q1: Can I create complex pages like the image here below? And are the pages responsive?

    CMS Kit is just a module that provides pages written in markdown or/and html + css + js. So, responsiveness is according to your design and styles. I.E. If you follow bootstrap grid system and classes, it will be responsive. You can attach additional CSS and JS for a specific pages or you can add globally them.

    Can I add dynamic widgets into these pre-made pages? I´m pretty sure it is but want to ask.

    Yes, The widget system aims this. All the widgets are rendered by requesting to the server-side. So, you can even make them rendered different according to the authenticated user. https://abp.io/docs/latest/modules/cms-kit/dynamic-widget#adding-the-widget In this example, TodayViewComponent will be executed on the server-side and you can make database operations, HTTP requests or whatever you need to render this component. I.E. You can create a ProductListComponent that lists the first 4 products from the database etc.

    Can I intercept the "create page" button and offer my own popup UI for selecting a template?

    You can completely replace Create.cshtml in your project and make it completely different than the original CMS Kit page. You can follow this guide to override a page from a module in your application: https://abp.io/docs/latest/framework/ui/mvc-razor-pages/customization-user-interface

    Can you edit the dynamic widget from the page its on by clicking on the widget on the page its self? I would not want to go the the menu for it and I don´t want manual editing of text.

    Currently it's not possible. It's designed to be managed by admin-side and page create/update editor. This data is stored application-wide, so if it can be edited in the page itself_(public-side)_ you may need to keep data per each client. So, you may need implement a different new logic for this kind of operation.

  • User Avatar
    0
    enisn created
    Support Team .NET Developer
    1. Can I create a complex pages by using CMS Kit out of the box or do I need to create custom page templates (that every tenant will have access to from "create page" button)?

    Yes, you can add any kind of ViewComponent to the widget list with their own editor. In the documentation we only show a single parameter which is Format, but you can design much more complex component editors for your components. The following example show a modal design that will be shown when you click the widget to add the page. You can add multiple parameters and inputs for a specific component:

    2.If I need to create custom template page, can CMS Kit manage the content for the page? - If I allow the tenant to change from a template with different content placeholders then the content would be lost.

    Widgets are application-wide. If a widget used across different tenants, it'll work unless you do something according to the TenantId or authneticated user in the ViewComponent code. But the page itself is multi-tenant and page content won't be shared across tenants.

    1. If I allow the tenant to change from a template with different content placeholders then the content would be lost.

    Sorry, I couldn't recognize about "template", do you mean themes like: LeptonX, Basic Theme etc?

    1. Could a Dynamic Widget be used to create these "sections" of premade blocks (as seen on image below)? This would probably be the most ideal scenario. Then I would have a "Hero widget" a "Carousel widget" etc. that has different elements (text, images, placement of text, enable/disble etc.) that the user can change for that page. The only issue I see here is that the CMS menu will quickly fill up with many many widgets.

    Yes, each section can be defined as Widget in the CmsKitContentWidgetOptions and users can add them directly into their own pages and it'll be rendered. For example, you can create a SliderViewComponent for this purpose and create a new Entity named Slider. So users can create and set multiple images and titles for a slider. Then they come back to page creation/edit page and add a SliderWidget by selecting slider entity from a dropdown to show in this component? So, you can keep data from different entity and make them selectable while widget is adding to the page. (You can even customize shown items according to authenticated user, since you build this modal design like I said in Q2)

    1. Do the Dynamic Widgets open up in design/edit mode when I click on them (in the text field of CMS Kit) after they have been added as content? If I have complex widget then I would like my tenants to have a UI (that might have extra information in it)

    Dynamic widgets are rendered even in Edit mode. But because of limitation of editor, it can be shown in preview tab of the editor instead WYSIWYG mode. But still it can help to see entire page before saving it. In the editor mode, it'll be shown according to your parameters something like that:

    [Widget Type="Slider" Id="ac41e19a-3398-459f-a382-3bd33f17a8d7" Animate="true" AutoCycle="false"]
    
    1. Can I intercept the "create page" button and offer my own popup UI for selecting a template?

    Already mentioned in the previous post

  • User Avatar
    0
    Sturla created

    Thanks for the input enisn.

    I will soon start to explore the CMS in details (and going through your answer) and figure out what options I have and how much I need/can built on top of it. I will come back here and add any feedback/knowledge I gain on that journey.

    Just to add (as it might give you an idea for making the CMSKit better) I will also be exploring something like this here.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09