OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.37k stars 2.38k forks source link

change the theme of edit page or create page "Content Types" #6915

Closed VahidFPA closed 4 years ago

VahidFPA commented 4 years ago

Is there a way to change the theme of edit pages or create pages per "Content Type"? If there is an example, can you introduce a working example?

hishamco commented 4 years ago

The theme will be applied on the site or the admin site, this is common in almost if not all the CMSs, I'm not sure why you need that

VahidFPA commented 4 years ago

I created a "content typed" that I want to add or edit the page that is in the admin to the site template and take the appearance of the site template

hishamco commented 4 years ago

Do you mean you want replace the admin site theme with the site theme?

VahidFPA commented 4 years ago

Almost something like that

hishamco commented 4 years ago

Go to Themes from the admin site, then choose the default theme instead of the TheAdminTheme, but this required to mention that your theme is applied for site and admin theme. Have a look to

https://github.com/OrchardCMS/OrchardCore/blob/c8e7ea5cdf74042568f61465a21474338640b6fc/src/OrchardCore.Themes/TheBlogTheme/Recipes/blog.recipe.json#L81-L83

VahidFPA commented 4 years ago

Thank you very much for your answer I mean I do not want to use Orchard as cms Use it as a web application to have only the admin section and be able to edit the admin section

hishamco commented 4 years ago

I mean I do not want to use Orchard as cms

If you want ti use is as Framework that is another thing

Use it as a web application to have only the admin section and be able to edit the admin section

So you are using it as Source of Data, again you need the admin theme in both ways, unless I miss something

/cc @agriffard

ns8482e commented 4 years ago

@VahidFPA Orchard Core Framework is blank slate - it provides you tools to build modular/multi-tenant application in ASP.NET Core. See, per https://docs.orchardcore.net/en/dev/docs/guides/create-modular-application-mvc/ - If you use this then I guess you need to create all bits and pieces of your application on your own.

However Orchard Core provides some out-of-the-box modules ready to use to speed up the development. These modules are designed and developed for Orchard Core CMS. For example, Admin section available in OrchardCore.Admin, User management available in OrchardCore.Users only work with Orchard Core CMS. See how to create cms application here https://docs.orchardcore.net/en/dev/docs/guides/create-cms-application/ Orchard Core CMS uses YesSQL for document store.

My guess is that you need Orchard Core CMS. However you don't want to use content management features. If that's the case then you can create Orchard Core CMS site using Software-as-Service recipe. You can create your own DisplayManager<T> that creates Views for Edit shapes of your model T and call _displayManager.BuildEditor directly from your controller.

VahidFPA commented 4 years ago

Thank you very much for the help