Hide sign in as Different User action on welcome menu using customization of welcome control
Open WelCome.ascx file in visual studio. you found this file in controltemplates folder. We want to show only sign out option for welcome menu. Remove menu templates as per your required and save as "Custom_Welcome.ascx"
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Control Language="C#" Inherits="Microsoft.SharePoint.WebControls.Welcome,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" AutoEventWireup="false" compilationMode="Always" %> <SharePoint:PersonalActions accesskey="<%$Resources:wss,personalactions_menu_ak%>" ToolTip="<%$Resources:wss,open_menu%>" runat="server" id="ExplicitLogout" Visible="false"> <CustomTemplate> <SharePoint:FeatureMenuTemplate runat="server" FeatureScope="Site" Location="Microsoft.SharePoint.StandardMenu" GroupId="PersonalActions" id="ID_PersonalActionMenu" UseShortId="true" > <SharePoint:MenuItemTemplate runat="server" id="ID_Logout" Text="<%$Resources:wss,personalactions_logout%>" Description="<%$Resources:wss,personalactions_logoutdescription%>" MenuGroupId="200" Sequence="300" UseShortId="true" /> </SharePoint:FeatureMenuTemplate> </CustomTemplate></SharePoint:PersonalActions><SharePoint:ApplicationPageLink runat="server" id="ExplicitLogin" ApplicationPageFileName="Authenticate.aspx" AppendCurrentPageUrl="true" Text="<%$Resources:wss,login_pagetitle%>" style="display:none" Visible="false" />
Open site master page on page search for register tag of welcome control
<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
replace with src="~/_controltemplates/Custom_Welcome.ascx" %>
Refresh the page and get happy...
No comments:
Post a Comment