Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Creating a new property that is on every page type

Vote:
 

hi,

i want to create a property that doens't needed to be added in but exists by default for every page type.  I am guessing this must have been done before but am struggling to find the right article online? 

#50897
May 16, 2011 22:24
Vote:
 

If you're using PageTypeBuilder, this is quite simple -- make it a property of your base class.

If you're not using PageTypeBuilder, there are utilities that make it easy to copy properties from one Page Type to another, but I think that's your only option.

#50898
May 16, 2011 22:55
Vote:
 

Its called dynamic properties :)

#50899
May 16, 2011 23:22
Vote:
 

Well played, good sir.  Well played.

#50900
May 16, 2011 23:30
Vote:
 

Dynamic properties can be a bad choice since they are inherited. For example, if you want to add a "information owner" contact to every page you don't want that to be inherited, but rather make it a mandatory page property.

#50904
May 17, 2011 6:45
Vote:
 
It's possible to add some properties to every page type, but it's a bit tricky 1) attach to dataform populate event 2) add your properties 3) on save check if new added properties exists and if not create them 1) can be replaced with attaching to getpage event
#50906
May 17, 2011 8:35
Vote:
 

This is one of those things that EPiServer really needs, but the existence of PTB might actually stop them from adding it.

#50936
May 17, 2011 15:46
Vote:
 

we had ruled out dynamic properties because they are considered processor heavy. 

not using page type builder

will have a look at the third option and see how i get on

Thanks

 

#50941
May 17, 2011 22:34
Vote:
 

I dont think dynamic properties are that processor heavy. Are using them in high volum sites and they work great

#50942
May 17, 2011 22:36
Vote:
 

http://world.episerver.com/Blogs/Magnus-Strale/Dates/2010/10/Dynamic-property-performance-improvements/

we are not on R2 yet so still working with the older issues

#50943
May 17, 2011 22:42
* 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.