Contents with the Content field Tag Node
-
Monaco Editor, Introduce ResourcePosition - This week in Orchard (13/03/2021)
Admin UI, This week in Orchard, Content field, Theme, RecipesThe Monaco Editor is the code editor that powers VS Code. And from now you can use it in Orchard Core too! Check out our post for the latest improvements of Orchard Core and don't forget to take a look at our Orchard Ambassadors Toolbox!
-
Dynamic user permissions, Multi Text Field - This week in Orchard (14/02/2021)
Permissions, Documentation, This week in Orchard, Content field, RoleWe also have two demos this week! One is about the Multi Text Field, a new field that can be used to define multiple selectable options to a given list, the other is about the new dynamic user permissions, which can be useful if you would like to restrict user management by their allocated roles. Read our post for more!
-
Cypress Tests, Media Profiles background color - This week in Orchard (13/12/2020)
Query, This week in Orchard, Content field, Theme, RecipesHave you ever wondered how to write end-to-end tests for your Orchard Core application? Check out our current post to read about Cypress, which is a next generation front end testing tool built for the modern web. But first, let's start with the other exciting improvements!
-
User Picker Field, the new user ID - This week in Orchard (06/12/2020)
Admin UI, Permissions, Localization, This week in Orchard, Content field, Role, PermissionThis time we will do a little deep dive and check out some important changes in the code base of Orchard Core. But don't be scared, we promise you will like these changes, especially the demo about the new User Picker Field!
-
Why is my content part not recognized in Orchard Core? - Orchard Nuggets
Orchard Nuggets, Content field, Content partYou have implemented your
MyAwesomePart
but you cannot attach it to your content type using the dashboard because it's not showing in the Content Parts list (Content -> Content Definition -> Content Parts)?
The most possible reason for this that you haven't registered your implementation in the service container. To register your class in the service container head to the Startup.cs file of your module and in theConfigureServices
method add the following line:services.AddSingleton<ContentPart, MyAwesomePart>();
But if you are using the RC1 version of Orchard Core or newer you can use theAddContentPart
extension method, where you just only need to provide your content part:services.AddContentPart<MyAwesomePart>();
. TheAddContentPart
and theAddContentField
(that you can use to register your fields) can be found in the OrchardCore.ContentManagement namespace.
Another recommendation is to use the Part suffix when naming your class or cs file that contains your custom part. Don't forget to put it in a Models folder to follow the recommendation of the MVC (model-view-controller) software design pattern.
For more information about registering your Part check out the Startup.cs file of our Orchard Core Training Demo module, where we registered thePersonPart
in the service container. We also mentioned the new way of registering ContentParts and ContentFields in this post of our This week in Orchard series.