Zimmergren MOSS 2007 Tip #4: Extending the "Site Actions" menu with a custom feature

In this little tip I will show you how you can customize the "Site Actions" menu by creating a Feature to manipulate the menu and deploy it to your SharePoint site.

This post, as the previous in the series is just an overview of what can be done and will not be discussed in detail how things are done since it’s just a little tip. If you’d like to full post on how to create features or extend the menus, please leave me a comment.

The first thing I usually do is to launch an empty VS 2005 project and add a file called "Feature.xml" and a file called "Elements.xml"  to the project, and set the files’ Schemas-property to "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEXMLwss.xsd" in order to get the Visual Studio 2005 IntelliSense to work properly.

In this screenshot you’ll see my simple Feature.xml file:
Note: the GUID is simply generated by going to Tools -> Create GUID, then implement it without the { and }. The file is also referencing a file called Elements.xml that I created, see next screenshot.

This is the Elements.xml file:
zimmergrentipfour (2)

Now that those two simple files are created, all I need to do is create a new folder in "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEFEATURES" to host my feature, then deploy to my server.
See screenshot:
zimmergrentipfour (3)

Now we will deploy the feature by using the cmd-line tool STSADM.EXE, as you can see in the following screenshot:
zimmergrentipfour (4)
Note: Don’t forget to reset IIS in order for your feature to become availible

This is the result:
zimmergrentipfour (5)

Sign up to my newsletter!

* indicates required

About Tobias Zimmergren

Hi, I'm Tobias. I plan, architect and develop software and distributed cloud services. Nice to meet you!