You will need to create a "custom action".
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="{42550415-FD08-4f1f-BAE6-93CCB2A2DE60}"
Location="Microsoft.SharePoint.StandardMenu"
GroupId="SiteActions"
ControlAssembly="DemoCustomAction"
ControlClass="DemoCustomAction.ListSettingsMenu">
</CustomAction>
namespace DemoCustomAction
{
public class ListSettingsMenu: System.Web.UI.WebControls.WebControl
{
protected override void CreateChildControls()
{
SubMenuTemplate listSettings = new SubMenuTemplate();
listSettings.Text = "List Settings";
listSettings.Description = "Manage settings for lists on this site";
listSettings.ImageUrl = "/_layouts/images/lg_ICASCX.gif";
foreach (SPList list in SPContext.Current.Web.Lists)
{
if (!list.Hidden)
{
MenuItemTemplate listItem = new MenuItemTemplate();
listItem.Text = list.Title;
listItem.Description = string.Format(
"Manage settings for {0}", list.Title);
listItem.ImageUrl = list.ImageUrl;
string url = string.Format(
"{0}/_layouts/listedit.aspx?List={{{1}}}",
SPContext.Current.Web.Url, list.ID.ToString());
listItem.ClientOnClickNavigateUrl = url;
listSettings.Controls.Add(listItem);
}
}
this.Controls.Add(listSettings);
}
}
}
source: http://weblogs.asp.net/jan/creating-hierarchical-menus-with-a-customaction-in-sharepoint
other links:
http://www.c-sharpcorner.com/uploadfile/anavijai/how-to-add-an-item-to-the-site-actions-menu-in-sharepoint-2010/
http://blogs.msdn.com/b/vssharepointtoolsblog/archive/2010/02/18/adding-actions-to-site-actions-menu.aspx
http://gilleslauwers.wordpress.com/2011/11/22/add-custom-action-in-site-actions-menu-at-a-specific-location/