Friday, 18 January 2013

Sharepoint 2013 Site Action menu control


Site action
                      <span class="ms-siteactions-root" id="siteactiontd" title="Site Action">
  <SharePoint:SiteActions runat="server" accesskey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
PrefixHtml=""
SuffixHtml=""
ImageUrl="/_layouts/15/images/spcommon.png?rev=23"
ThemeKey="spcommon"
MenuAlignment="Default"
MenuNotVisibleHtml="&amp;nbsp;"
LargeIconMode="false"

>
<CustomTemplate>
<SharePoint:FeatureMenuTemplate runat="server"
FeatureScope="Site"
Location="Microsoft.SharePoint.StandardMenu"
GroupId="SiteActions"
UseShortId="true"
>
 <SharePoint:MenuItemTemplate runat="server"
 id="MenuItem_ShareThisSite"
 Text="<%$Resources:wss,siteactions_sharethissite%>"
 Description="<%$Resources:wss,siteactions_sharethissitedescription%>"
 MenuGroupId="100"
 Sequence="110"
 UseShortId="true"
 PermissionsString="ViewPages"
 PermissionMode="Any" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
 Text="<%$Resources:wss,siteactions_editpage15%>"
 Description="<%$Resources:wss,siteactions_editpagedescriptionv4%>"
 ImageUrl="/_layouts/15/images/ActionsEditPage.png?rev=23"
 MenuGroupId="200"
 Sequence="210"
 PermissionsString="EditListItems"
 ClientOnClickNavigateUrl="javascript:ChangeLayoutMode(false);" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_CreatePage"
 Text="<%$Resources:wss,siteactions_addpage15%>"
 Description="<%$Resources:wss,siteactions_createpagedesc%>"
 ImageUrl="/_layouts/15/images/NewContentPageHH.png?rev=23"
 MenuGroupId="200"
 Sequence="220"
 UseShortId="true"
 ClientOnClickScriptContainingPrefixedUrl="OpenCreateWebPageDialog('~siteLayouts/createwebpage.aspx')"
 PermissionsString="AddListItems, EditListItems"
 PermissionMode="All" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
 Text="<%$Resources:wss,siteactions_addapp15%>"
 Description="<%$Resources:wss,siteactions_createdesc%>"
 MenuGroupId="200"
 Sequence="230"
 UseShortId="true"
 ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/addanapp.aspx')"
 PermissionsString="ManageLists, ManageSubwebs"
 PermissionMode="Any" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
 Text="<%$Resources:wss,quiklnch_allcontent_15%>"
 Description="<%$Resources:wss,siteactions_allcontentdescription%>"
 ImageUrl="/_layouts/15/images/allcontent32.png?rev=23"
 MenuGroupId="200"
 Sequence="240"
 UseShortId="true"
 ClientOnClickNavigateUrl="~siteLayouts/viewlsts.aspx"
 PermissionsString="ViewFormPages"
 PermissionMode="Any" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ChangeTheLook"
 Text="<%$Resources:wss,siteactions_changethelook15%>"
 Description="<%$Resources:wss,siteactions_changethelookdesc15%>"
 MenuGroupId="300"
 Sequence="310"
 UseShortId="true"
 ClientOnClickNavigateUrl="~siteLayouts/designgallery.aspx"
 PermissionsString="ApplyThemeAndBorder,ApplyStyleSheets,Open,ViewPages,OpenItems,ViewListItems"
 PermissionMode="All" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"
 Text="<%$Resources:wss,siteactions_settings15%>"
 Description="<%$Resources:wss,siteactions_sitesettingsdescriptionv4%>"
 ImageUrl="/_layouts/15/images/settingsIcon.png?rev=23"
 MenuGroupId="300"
 Sequence="320"
 UseShortId="true"
 ClientOnClickScriptContainingPrefixedUrl="GoToPage('~siteLayouts/settings.aspx')"
 PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"
 PermissionMode="Any" />
 <SharePoint:MenuItemTemplate runat="server" id="MenuItem_SwitchToMobileView"
 Visible="false"
 Text="<%$Resources:wss,siteactions_switchtomobileview%>"
 Description="<%$Resources:wss,siteactions_switchtomobileviewdesc%>"
 MenuGroupId="300"
 Sequence="330"
 UseShortId="true"
 ClientOnClickScript="var mswlh = window.location.href; if (mswlh.indexOf('?')==-1) { window.location = mswlh + '?mobile=1'; } else { window.location = mswlh + '&mobile=1'; }" />
</SharePoint:FeatureMenuTemplate>
</CustomTemplate>
 </SharePoint:SiteActions> </span>

No comments:

Post a Comment