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.43k stars 2.4k forks source link

"Field editor" documentation - Missing part #6967

Open vitalybrandes opened 4 years ago

vitalybrandes commented 4 years ago

Add important note to the help that the editor cdhtml file must be added to module and will not work in Theme!

https://docs.orchardcore.net/en/dev/docs/reference/modules/ContentFields/#creating-custom-editors

sebastienros commented 4 years ago

Can you create a PR ?

ns8482e commented 4 years ago

It’s for Admin, so it works in only admin theme or AdminTemplates

Skrypt commented 4 years ago

You can override Editors in a Theme I'm pretty sure of that. Have you tried adding it to your theme Views/OrchardCore.ModuleName/youreditor.cshtml folder? Make sure it sits in the same folder than what it is in your base module inside your Theme Views/YourModule folder.

deanmarcussen commented 4 years ago

No the original post is correct.

Editors must be added to

(which you choose is a matter of preference only)

They won't be found when placed in a front end theme, as the shape table will look in the admintheme shape table for editor shapes / views.

vitalybrandes commented 4 years ago

Can you create a PR ?

@sebastienros i am sorry, i have no idea how to do that :-(

ns8482e commented 4 years ago

@vitalybrandes I have not tested but you can try adding @attribute [Admin] to your View and see if it works.