An Avanade Blogging Community

Welcome to An Avanade Blogging Community Sign in | Join | Help
in Search

Marco Rizzi - All around Sharepoint

Customize Site Actions menu items

A common question of customers:
is it possible to customize Site Action menu adding new items or removing existing OOB items? Yes, it is.

When the publishing page feature is activated, the data source for the “SiteAction” comes from the XML file which lies in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\EditingMenu\Siteaction.xml.
The menu items of Site Action is contained in that file and you can add easily new item in two ways:
  • with features if you want to have the ability to switch the feature on or off depending on site
  • editing a sharepoint file used to customize the menu item for all the sites
To remove existing item you have to browse to the master page gallery in the site collection and edit “CustomSiteAction.xml” under “EditingMenu” folder.  Here you have to write custom node and set “ChangedNodeId” and “ConfigeMenu” property you can replace your custom console node with existing console node.

This example remove out-of-box 'Create Page' menu item and add a new one to create page with custom flow:
<?xml version="1.0" encoding="utf-8" ?>
<Console>
 <references>
       <reference TagPrefix="cms"
         assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"   namespace="Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions" />
   </references>
   <structure >
     <ConsoleNode ConfigMenu="Replace" ChangedNodeID="wsaCreatePage" />
     <ConsoleNode Action="cms:CreateNewPublishingPageAction" 
         DisplayText="cms,siteactions_createpage_displaytext" 
         Description="cms,siteactions_createpage_description"
         HideIfDisabled="true" 
         UseResourceFile="true" 
         MenuGroupId="100" 
         Sequence="6000"
         IsSiteRelative="true" 
         PermissionContext="CurrentList" 
         ImageUrl="/_layouts/images/crtpage.gif"
         NavigateUrl="/_layouts/Customcreatepage.aspx" 
         ID="wsaCreatePage1"/>
   </structure>
</Console>

Published Wednesday, July 23, 2008 8:41 AM by marco.rizzi
Filed Under:

Comments

No Comments
Anonymous comments are disabled

This Blog

Post Calendar

<July 2008>
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Syndication