Change rendering of DataAbstraction.Category categories in edit mode

Vote:
 

Hi folks,

I'm wondering if anyone can give me some pointers on how I might go about changing the way the EpiServer editor renders DataAbstraction.Category categories.  At the moment, they display in one long ugly list, with only identation to break them up.  It would be nice for our content editors if I could add borders and display them horizontally like a normal checkbox list.

Cheers,

Tim

#53708
Sep 21, 2011 3:27
Vote:
 

Hi Tim!

I think that you should be able to create a custom property control and register this to be used for the PageCategory property. The standard installation of CMS 6 (and R2) has a commented section that shows how to register a custom property control for a property. This is of course also possible to do programatically.

#53709
Sep 21, 2011 7:25
Vote:
 
#53710
Sep 21, 2011 7:27
Vote:
 

Thanks for your reply Linus, but I'm still not quite sure how to go about it.  Where can I find the commented section in CMS6 R2 that shows how to register a custom property control for a property?

Nevertheless, even if I were to create a custom control, I don't know how I would apply that to override whatever method it is that renders the DataAbstraction.Category categories into a table.  I sort of expected either DataAbstraction.Category or DataAbstraction.CategoryCollection to have a render method that I might be able to override, but I can't see anything like that in the Object Browser.  If you have any specific examples, especially relating to the DataAbstraction.Category categories, it would really help me.

Cheers,

Tim

#53743
Sep 22, 2011 3:12
Vote:
 

The DataAbstraction classes are data classes and have nothing with rendering to do. The default class responsible for rendering categories for a page in edit mode is PropertyDateControl (http://sdk.episerver.com/library/cms5/html/AllMembers_T_EPiServer_Web_PropertyControls_PropertyDateControl.htm). Either you inherit from this class, do an override on CreateEditControls or create a control adapter (standard .NET technology) to do the same. Either way you either need to register you control in the control factory or your adapter in the configuration files. The link I sent yesterday describes how to register to the control factory programatically.

#53744
Sep 22, 2011 6:36