Solved

Sharepoint 2010 - master page mods not taking effect

Posted on 2012-12-28
11
701 Views
Last Modified: 2013-01-01
I made a copy of my v4.master, changed the PermissionsString for idNavLinkViewAll to hide the "All Site Content" link, and changed the width of the Quick Links list from the default 150px to 250px. I then saved the copy, checked it back in, published it, approved the changes, and set it as the site default master.

However, when I open the site's home page none of the changes I made in the master are in effect - nothing has changed. All users can still see "All Site Content" and the width of the quick link list is still 150px.

Any suggestions would be appreciated.
Thanks
Dave
0
Comment
Question by:dgmoore1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 16

Expert Comment

by:jessc7
ID: 38727817
If the custom master page has an error in it, SharePoint will use the default custom master page to render the page rather than the custom master page.

Have you verified (by looking at the source, etc.) that your custom master page is being used? Maybe add an HTML comment you can search for in the source.
0
 

Author Comment

by:dgmoore1
ID: 38727978
I have verified under Site Settings | Look and Feel |Master Page that the correct master is being used. When I reset it back to the original v4.master there is no change in the appearance or behavior of the pages, as if the original master and my copy are identical. But examination of both shows that the changes are present in the custom version and not in the original. I'm stumped so far. I'm pretty sure there are no errors in the custom master - I only substituted "ManageWeb" in the idNavLinkViewAll PermissionsString, and changed "150px" to "250px" in the style for the Quick Link list width.
0
 
LVL 16

Expert Comment

by:jessc7
ID: 38729357
Can you please add an HTML comment to your new master page, republish and approve? Then visit a page using the new master page, and view the HTML source. If you do not see the HTML comment in the source, your new master page is not being used. Let's start here, and see if your new master page is even being rendered.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:dgmoore1
ID: 38729411
OK - I'll try that. Thanks
0
 

Author Comment

by:dgmoore1
ID: 38730948
OK - I added an html comment to the master and verified in the source of one of the pages that the master in question is the one being used. I copied the original v4.master and made just two changes: I changed the PermissionsString for idNavLink to "ManageWeb" and I change the width of the quick launch from 155px to 255px.

Neither of these changes are taking effect - All Site Content is still visible to all, and the width of the Quick Launch remains at 155px
0
 
LVL 16

Expert Comment

by:jessc7
ID: 38731019
OK great. Can you post the master page to EE?
0
 

Author Comment

by:dgmoore1
ID: 38731128
OK - here's the file in question
v4-copy-1-.master
0
 
LVL 16

Expert Comment

by:jessc7
ID: 38733944
OK - I am still looking at this. I did a visual diff between the OOTB v-4 master page, and the file you posted. See the attached report. Were you expecting to see this much difference?

I was able to quickly apply the master page and get it to render. I will look at it more.
differences.html
0
 
LVL 16

Accepted Solution

by:
jessc7 earned 500 total points
ID: 38733991
Here are the changes I made to a copy of a v4.master page to accomplish what you are after...

First, for the requirement to resize the Quick Launch area, add the following CSS before the closing </head> tag in your master page:

<style type="text/css">
/* Set the width of the Quick Launch */
BODY #s4-leftpanel {
	width:250px;
}
/* Compensate for the custom width on the Quick Launch */
.s4-ca {
	margin-left:250px;
}
</style>

Open in new window


For the second requirement to hide the View All Content link except for Site Managers, you need to edit the master page in a couple of places.

Search for the following block, and make the change to the permission level as seen in line 9 of the following snippet. This will hide the like in the Site Actions menu.

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
	Text="<%$Resources:wss,quiklnch_allcontent%>"
	Description="<%$Resources:wss,siteactions_allcontentdescription%>"
	ImageUrl="/_layouts/images/allcontent32.png"
	MenuGroupId="300"
	Sequence="302"
	UseShortId="true"
	ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
	PermissionsString="ManageWeb"
	PermissionMode="Any" />

Open in new window


Next, find the following block, and make the permission change as seen in line 4. This will hide the link in the Quick Launch for any 2007 site collection running in compatibility mode on 2010. (Doesn't impact pure 2010 sites.)

<SharePoint:UIVersionedContent UIVersion="3" runat="server">
	<ContentTemplate>
		<h3 class="ms-standardheader"><label class="ms-hidden"><SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,quiklnch_pagetitle%>" EncodeMethod="HtmlEncode"/></label>
		<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">
			<div class="ms-quicklaunchheader"><SharePoint:SPLinkButton id="idNavLinkViewAll" runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" Text="<%$Resources:wss,quiklnch_allcontent%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/></div>
		</SharePoint:SPSecurityTrimmedControl>
		</h3>
	</ContentTemplate>
</SharePoint:UIVersionedContent>

Open in new window


Finally, make the change for normal SharePoint 2010 sites, to remove the link from the Quick Launch. Note I added the SPSecurityTrimmedControl tag around the <li>. I did this to keep the list markup clean, rather than render an empty set of <li></li> tags for normal users.

<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb">
<li>
	<SharePoint:ClusteredSPLinkButton
		id="idNavLinkViewAllV4"
		runat="server"
		PermissionsString="ViewFormPages"
		NavigateUrl="~site/_layouts/viewlsts.aspx"
		ImageClass="s4-specialNavIcon"
		ImageUrl="/_layouts/images/fgimg.png"
		ImageWidth=16
		ImageHeight=16
		OffsetX=0
		OffsetY=0
		Text="<%$Resources:wss,quiklnch_allcontent_short%>"
		accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</li>
</Sharepoint:SPSecurityTrimmedControl>

Open in new window

0
 

Author Closing Comment

by:dgmoore1
ID: 38734424
This is perfect. I'm surprised at how many differences there are between your v4.master and mine. My v4.master is as provisioned to all site collections by our farm administrator - evidently it's been customized quite a bit. This is a corporate intranet site, and all site collections use similar branding and basic features.

Thanks very much - you deserve all of the points, plus a couple of gold stars. This helps me a lot.
0
 
LVL 16

Expert Comment

by:jessc7
ID: 38734470
Glad I could help out!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question