Hiding Templates Links buttons and things in SharePoint

Important thing to be aware of

It is interesting to note that if you de-activate the Site Collaboration lists Feature at the site level that it will hide most lists templates, even ones you create and store in the List Template Gallery from, say, the Custom List template. Because this list definition is set to hidden, we would expect that all list templates that were derived from the list definition, as well as the list definition itself to be hidden from the Create page in the UI. This is not what I would expect but it seems to be the way it is designed. We were able to create a new document library from the list template by executing the following powershell script, which is not impacted by the Hidden="TRUE" attribute. $weburl = “http://teamspace.ppr.intra/sites/EAMESEFIN” $templatename = “Restricted-10-18” $web = Get-SPWeb $weburl $listTemplates = $web.Site.GetCustomListTemplates($web) $web.Lists.Add("RestrictedLibraryFromPowershell", "", $listTemplates[$templatename]) $web.Dispose()

Custom Security Trimming of a link

You want to implement the showing of link based upon some specific user permissions then create a custom link outside the quick launch menu and a link to the custom list inside a SPSecurityTrimmedControl. <Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ViewFormPages">


How to Hide “Open in Windows Explorer” option

1. Make a copy of the DefaultTemplate.ascx located in the X:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\.

2. Rename the copy to CustomDefaultTemplate.ascx

3. Open the CustomDefaultTemplate.ascx in any text editor and Find the line ID=”OpenInExplorer “ (usually line 1812 ).

4. Change PermissionsString=”UseClientIntegration“ to PermissionsString=”ManageWeb“ and save the file.


6. Now if any user, other than the Site Owner Logins into the SharePoint Site they will not be able to see the “Open with Windows Explorer” option.


Remove the breadcrumb control from their site’s master page

Wrap SharePointSPSecurityTrimmerControl around the table element that renders the breadcrumb.

<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server"> <table class="s4-titletable" cellspacing="0"> <tbody> <tr> <td class="s4-titlelogo"> <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic"> <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/siteIcon.png" runat="server"/> </SharePoint:SPLinkButton> </td> <td class="s4-titletext"> <h1 name="onetidProjectPropertyTitle"> <asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server"> <SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server"> <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitle" Visible="false"> <SharePoint:ProjectProperty Property="Title" runat="server"/></SharePoint:SPLinkButton> </SharePoint:SPSecurityTrimmedControl> </asp:ContentPlaceHolder> </h1> <span id="onetidPageTitleSeparator" class="s4-nothome s4-bcsep s4-titlesep"> <SharePoint:ClusteredDirectionalSeparatorArrow runat="server"/> </span> <h2> <asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" /> </h2> <span lang="en-us">sdfasdf</span>

</td> <td class="s4-socialdata-notif"> <SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/> </td> </tr> </tbody> </table> </SharePoint:SPSecurityTrimmedControl>