Try our conversational search powered by Generative AI!

Add Property to Block/Page Type




In the cms, if i go to admin > content type, I am able to add properties to existing page/block types.

In the scenario a content editor wants to do this, how do these newly added properties get rendered on the page if they're not part of the razor template?

Edited, Apr 26, 2018 23:49

They will not be rendered on the page. There is many metadata properties like sortorder, publish dates etc that typically dont get rendered. You can however in code like in a controller have logic that is based on the value of such metadata properties.

Apr 27, 2018 8:44

In the modern versions of Episerver 7+ all properties should be added via code, they should never be added in the admin backend. The feature still exists as a legacy area, mainly the type view is uses to delete properties that have been removed from code and to check the settings. Adding properties should only ever be done by a developer, in code.

Apr 27, 2018 11:46

CC, please read more about how to do this by code here:

Also install the Visual Studio extension found here:

Then create a demosite (Create new project and include Alloy through the episerver menu item) and look how it is done there

Good luck!

Apr 27, 2018 12:16

So, it sounds like before Episerver 7 there was a way to do this, and in current version this is no longer supported.

Is this correct?

Apr 27, 2018 19:31

Yes. Back then we used PageTypeBuilder to get properties etc to get synchronized with code (so that we didn't need to do that by hand which is/was error prone).

As Scott already said, you shouldn't be using admin to modify these but have them in code (you get your changes to different environments automatically when you deploy code, that is the way to do it).

Edited, Apr 27, 2018 20:06
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.