How to move my part out of general and into Users

Topics: Customizing Orchard
Mar 13, 2012 at 9:23 PM
Edited Mar 13, 2012 at 9:24 PM

How can I move the settings part that I created (which is site whide) out of the general settings page and into the Users settings page?

I tried adding the following to my handler:

            Filters.Add(new TemplateFilterForRecord<SRBUserSettingsPartRecord>("SRBUserSettings", "Parts/SRBUserSettings", "users"));

While this did display my part in the Users settings pageit still left the part in the general settings page. I had to change my cshtml model to use

@model SRB.Portal.Authentication.Models.SRBUserSettingsPartRecord

instead of

@model SRB.Portal.Authentication.Models.SRBUserSettingsPart

This causes the part in the general settings page(which I want gone) to crash because it expects the SRBUserSettingsPart

Mar 13, 2012 at 10:16 PM

I'm partially there! I modified the handler so that the model is part.Record. I'm no longer crashing.

Now, i have my SRBUser part in both general and users. How do I remove it just from general?

Mar 13, 2012 at 10:31 PM


the filter in the handler was not needed:

            Filters.Add(new TemplateFilterForRecord<SRBUserSettingsPartRecord>("SRBUserSettings", "Parts/SRBUserSettings", "users"));

and the Editor method of the driver required .OnGroup("Users")