Try our conversational search powered by Generative AI!

How to add (and remove) custom page properties


I'l like to add a custom mode property that I can use in my page types. In this example I would like to add a DropDownList and I would like to get the values for it from an SQL table. I've tried creating a property before and right now I've got about 11 of those in the list of properties.

First, how do I remove these?

Second, what is the "right way" to create a custom property? Feels like I must had done something wrong here since I get a whole lot of the same property even though I removed the code for it.

Mar 21, 2011 11:41

Go to admin mode, select 'Page Type' tab, click 'Edit Custom Property Types' in 'Manage Page Types' section and remove unnecessary properties types.

Most probably there will be different class names (namespaces / assemblies) from which the property types are loaded.

Mar 21, 2011 11:52

Just as you wrote how to delete them I found them, but thank you for the reply!

How come it created so many how them?

Mar 21, 2011 11:56

EPiServer browse your code for classes with [PageDefinitionTypePlugIn] attribute. If there is no property that matches to the found class (Assembly, Namespace, Classname have to be identical), the new property is created. So if you renamed your class couple times and moved it across 2 or 3 namespaces, every time the new property type was registered in EPiServer.

Mar 21, 2011 12:28

Hmm. I don't think I did that but I'm going to try again now that I've found how to delete them. Thanks for all your help!

Mar 21, 2011 13:35

How do I create a custom dropdownlist? I can't seem to find how I did it last time?

I right click in Visual Studio, choose to create a new item and choose "Custom property", right? DropDownList is not an option there.

Mar 21, 2011 14:09

Well a drop down isn't how the property is stored. It is stored for example as a string. The property presenter is however a drop down.

Check this blog post:


Edited, Mar 21, 2011 15:24

Once again I managed to find the answer just before someone posted it. Thanks though, I appreciate it!

Mar 21, 2011 15:26

When I'm in edit mode my drop down doesn't remember what I picked last time. I assume I need to override some function for it to get the stored value but which one?

Mar 23, 2011 9:21
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.