|Number of votes:||0|
If you check the EPiServer SDK they way to do it is by attaching to the EditPanel loadedpage event i Global.asax.
What if you would like to to it for different pagetypes then? It would be no big thing to add a paget ype check and maybe make it configurable through a section i web.config.
Since I don’t like neither sections in web.config or having lot’s of code in global.asax i decided to try to accomplish this with a custom property.
It turned out to be very straight forward. Just create a custom property with a control class inheriting from PropertyStringControl, and add the below code to CreateEditControls.
Just add the property to the top of the Information tab and you should be good to go.
Note: After having so colleagues trying it out it seems that neither of the two approaches work i CMS5 R2, but both do in CMS5.