Understanding SharePoint Site Actions

A common practice when you want to customize a SharePoint application is inserting menu items to the Sharepoint Site Actions menu. This is mostly to give authorized users an easy access to the features and the functionality of the system. There are 3 ways that you can use to add personal items to your Site Actions menu.

These include submenus and fly outs.

Understanding SharePoint Site Actions

What is Sharepoint Site Action Menu?

This is a feature that grants access to the functionality of Site Actions like permitting page editing or displaying a new RibbonBar (when using SharePoint 2010). Share Point 2010 has allowed more control to developers, through a site action menu and its features.

Creating A Menu on Site Actions

You can add extra items to the Site Action menu by customizing the master page. This will include a new MenuItemTemplate element that is included in the program.

• Adding a SubMenu

You will need to use a SubMenuTemplate in order to add a submenu. At this point, you will not have to use the MenuItemTemplate. However, you should note that the SubMenuTemplate will not allow you to perform any action. This is because the template lacks the ClientOnClickXXX properties, which is a container for menu items to perform actions.

• Creating Menu Using Codes

It is easier to create multiple features with the incorporation of SharePoint 2010 and Visual Studio 2010. You will be required to create a SP 2010 Module project inside VS 2010 in order to start designing a feature that will customize the Site Action menu. When you create the project, ensure you have chosen a Farm solution and not a Sandbox. Once you have created the project, you can delete the Sample.txt file because it will be useless.

• Creating Menu From Elements.xml

It is easier to create the menu from the codes, however, some people prefer to employ a more versatile way and customize the menu structure using an Elements.xml file. Nevertheless, you will still need some codes in adding the menu items to your Site Actions menu.

You will begin by including another class to your Class Library project. This Library project is obtained from WebControl1 and it executes the CreateChildControls technique. After you are done, you will need to add one more module to your project. You will also have to delete the Sample.txt file and copy all the details of the preceding Elements.xml file. The content should be copied into one file that has been created. You must then change the ControlClass qualities to complement with the class that you have just created.

These are the 3 ways that you can construct and organize your Site Action menu items, together with sub menus to use for SharePoint 2010. You can add an added exploration to your menus by using these techniques to add features and items to your menu. All the methods are equally important and none is better than the other.

However, the method you use will be determined by your project requirements. Whichever method you use, you will get the same functionalities and features. You can therefore choose your desired technique in customizing and deploying SharePoint Site Actions menu.

sharepoint banner

Marissa Hart is the Lead Author & Editor ShareMe. ShareMe is a blog focused on SharePoint Online. SharePoint Online delivers the powerful features of SharePoint without the associated overhead of managing the infrastructure.