Add custom menu to Site Actions in Sharepoint 2010

So today’s SharePoint mission is adding a custom menu to the Site Action, this custom menu will link to a custom setting page (ordinary aspx page module).

After googling for a while I found a good solution here.

Basically it’s just creating a new SharePoint Project.  Adding an Empty Element and replace the Elements.xml into this.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="SiteActionsToolbar"
     GroupId="SiteActions"
     Location="Microsoft.SharePoint.StandardMenu"
     Sequence="1000"
                
     Title="My Settings"
     Description="My Site Settings"
     ImageUrl="_layouts/mylayout/img/widgets.png">
     <UrlAction Url="_layouts/mylayout/mypage.aspx"/>
  </CustomAction>
</Elements>

Make sure you add the element to a Feature.

And that is all .

See the detailed solution here.