Customise Edit User

Vote:
 

Hi All,

I would like to customise the edit user page in CMS admin mode and wondered if anyone knows how to do this without editing the core CMS files in program files.

I would like to remove the password and confirm password fields. Using reflector I can see there is a method called InitializeMembershipForm which looks ideal I'm just not sure how I can hook in a class that can inherit from the UserMembership class so that I can override this method.

Thanks in advance,

Mark

#46604
Dec 20, 2010 16:01
Vote:
 

Good that you found the class responsible for the view, and wise that you decided not to edit the files in Program Files :)

You can use the virtual path mapping provider to map the url of the aspx/ascx to a copy that you place inside your project. You can then let this copy inherit from a custom class which in turn inherits from the "original" codebehind class. Then override whatever you need to remove the controls (you can of course edit the aspx/ascx you copied too).

A different approach that might be feasible and in some ways is less intrusive and in some ways more "hacky" is to create a plugin for the PlugInArea.SidSettingsArea. That would normally add a new tab to the view, but perhaps there is a way to work from that tab to find controls in the other tabs and hide them. See this blog post http://labs.episerver.com/en/Blogs/Allan/Dates/2009/1/Neat-Trick-Modifying-Edit-Mode-Tabs/. I haven't used this for anything else than the Edit panel as described in the article, but theoretically it might work in a similar way.

A control adapter might also be a way, see http://labs.episerver.com/en/Blogs/Anders-Hattestad/Dates/2009/5/Hiding-tabs-based-on-roles/

#46609
Dec 20, 2010 17:41
Vote:
 

I you would like to customise the UI but not do it in program files then I have previously blogged about it here:

http://world.episerver.com/Blogs/David-Knipe/Dates/2010/5/Customising-the-EPiServer-UI/ 

It uses the virtual path mapping provider as Magnus described above

#46625
Dec 21, 2010 15:25
Vote:
 

Hi Magnus/David,

I tried the approach based on David's blog but couldn't get it to work, it still picked up the program files control. I created a control in my project as a copy of the user control in program files, added my custom code (as it was a straight copy it has all the correct inheritance) and added the virtual path mapping in episerver.config

Any thoughts?

Mark

#46671
Dec 23, 2010 12:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.