A quick shout out to this page – Adding Options to Sitecore Applications by Alistair Deneys . It’s a nice guide about how to do exactly that – add options to the menus in Sitecore. It was pretty straight forward to do for the User Manager:
- Add an entry in the Core database to represent the button
- Add a patch file that defines your command and what class it should call
- Add a class file that defines the command in a child of Sitecore.Shell.Framework.Commands.Command . Override and implement Execute
The parameters to the Execute method contains which usernames have been selected. This is as a pipe separated list:
public override void Execute(CommandContext context)
{
string usernamesParameter = context.Parameters["username"];
string[] usernames = null;
if (!string.IsNullOrEmpty(usernamesParameter))
{
char[] splitter = {'|' };
usernames = usernamesParameter.Split(splitter, StringSplitOptions.RemoveEmptyEntries);
}
That might help.