Skip to content

Understanding custom "Content Fields" and "Content Parts": when to create custom "Content Fields"? #15417

Answered by douwinga
MarGraz asked this question in Q&A
Discussion options

You must be logged in to vote

I am not much of a contributor to OrchardCore, so take this with a grain of salt (but have been using Orchard and OrchardCore for many years). I will explain how I think of things though and maybe it will help.

First, for your regex example, I would just use a custom editor for the existing text field. So then you would have an option like this on text fields

Content Fields are in a way similar to properties on a class, and then parts are the class (only true for parts that are just collections of fields). As a matter of fact you can create a content part class in code that does just that.

Basically I think of content fields as a way to display and edit a single value (like a form field…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@MarGraz
Comment options

@douwinga
Comment options

@MarGraz
Comment options

@douwinga
Comment options

@MarGraz
Comment options

Answer selected by MarGraz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants