JG Vimalan's Blog

It is all about coding!

Customize ‘Site Actions’ menu.

Hi, 

We are going to see how to add a custom menu item say, “My Shortcuts” in SharePoint ‘Site Actions’ menu.

1. Open your site say, http://MyServer/default.aspx in Sharepoint designer and browse to,

_catalogs/masterpage/editing menu/CustomSiteAction.xml

sc2

2. Checkout the ‘CustomSiteAction.xml’ and edit the file.

3. Add the menu item to display. Here we are going to display the ‘Web Part Gallery’ as shortcut link. 

<Console>

//Add the references

  <references>
    <reference TagPrefix=”cms”
    assembly=”Microsoft.SharePoint.Publishing, Version=12.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c”
    namespace=
    “Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions” />
  </references>

//Then add the menu item to display
  <structure>
        <ConsoleNode
        DisplayText=”Web Part Gallery”
        UseResourceFile=”false”
        ImageUrl=”/_layouts/images/ActionsSettings.gif”
        UserRights=”BrowseDirectories|ManageLists” 
        RequiredRightsMode=”Any”
        PermissionContext=”CurrentSite”
        IsSiteRelative=”true” 
        NavigateUrl=”_catalogs/wp/Forms/AllItems.aspx” 
        ChangedNodeID=”ViewPagesList”>            
      </ConsoleNode>
  </structure>      
</Console> 

4. Finally checkin the file.

5. You can add nested Console Node so that, multiple items are dislayed in the ‘Site Actions’ menu. See the snapshot below,

sc1

Regards,

JG Vimalan

Advertisements

July 30, 2009 - Posted by | SharePoint

3 Comments »

  1. How can I deploy this as part of a feature?

    Comment by David | October 17, 2009 | Reply

  2. I would also like to see a feature example. The link you supplied points to an article explaining how to alter the SiteActions menu using – it does not explain how to provision the CustomSiteAction.xml file within the Editing Menu folder 🙂

    Comment by Stig | October 20, 2009 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: