0

I've inherited a site developed by someone else. Its had some customisations.

I've also added a 2nd masterpage and created a page based on this 2nd masterpage. However this page somehow inherits the style applied in the orignal customisations. I want to prevent this from happening.

Here is the code of the original master page:

<head runat="server">
    <meta http-equiv="X-UA-Compatible" content="IE=8"/>
    <meta name="GENERATOR" content="Microsoft SharePoint"/>
    <meta name="progid" content="SharePoint.WebPartPage.Document"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Expires" content="0"/>
    <SharePoint:RobotsMetaTag runat="server"/>
    <title id="onetidTitle"><asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/></title>
    <script src="../Style Library/ARUKTOM/Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>

    <script src="../Style Library/ARUKTOM/Scripts/jquery.isotope.min.js" type="text/javascript"></script>
    <script src="../Style Library/ARUKTOM/Scripts/jquery.SPServices-2013.01.min.js" type="text/javascript"></script>
         <script src="../Style Library/ARUKTOM/Scripts/EventHelpers.min.js" type="text/javascript"></script>
         <script src="../Style Library/ARUKTOM/Scripts/cssQuery-p.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/sylvester.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/cssSandpaper.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/jquery.quicksearch.min.js" type="text/javascript">  </script>
          <script src="../Style Library/ARUKTOM/Scripts/textfill.js" type="text/javascript">  </script>
            <script src="../Style Library/ARUKTOM/Scripts/jquery.bxslider.min.js" type="text/javascript">  </script>

       <script type="text/javascript">
    $(function() {
    $('#s4-workplace').hide();
    $(window).load(function(){
        $('#s4-workplace').show();
    });
});
</script>
       <asp:ContentPlaceHolder ID="Stylesheets" runat="server">


    </asp:ContentPlaceHolder>  



    <SharePoint:CssLink runat="server" Version="4"/>
    <SharePoint:Theme runat="server"/>
    <SharePoint:ULSClientConfig runat="server"/>
    <script type="text/javascript"> var _fV4UI = true; </script>
    <SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server"/>
    <SharePoint:CustomJSUrl runat="server"/>
    <SharePoint:SoapDiscoveryLink runat="server"/>
    <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>
    <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>
    <SharePoint:SPShortcutIcon runat="server" IconUrl="/_layouts/images/favicon.ico"/>
    <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server"/>
    <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server"/>
    <SharePoint:SPPageManager runat="server"/>
    <SharePoint:SPHelpPageComponent Visible="false" runat="server"/>
</head>

and here is the source view of the default original page : NOTICE it has line href="/Style%20Library/ARUKTOM/styles.css" but I cannot find his in the original master page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" __expr-val-dir="ltr" lang="en-us" dir="ltr">

<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>

</title>
    <script src="../Style Library/ARUKTOM/Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>

    <script src="../Style Library/ARUKTOM/Scripts/jquery.isotope.min.js" type="text/javascript"></script>
    <script src="../Style Library/ARUKTOM/Scripts/jquery.SPServices-2013.01.min.js" type="text/javascript"></script>
         <script src="../Style Library/ARUKTOM/Scripts/EventHelpers.min.js" type="text/javascript"></script>
         <script src="../Style Library/ARUKTOM/Scripts/cssQuery-p.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/sylvester.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/cssSandpaper.js" type="text/javascript"></script>
        <script src="../Style Library/ARUKTOM/Scripts/jquery.quicksearch.min.js" type="text/javascript">  </script>
          <script src="../Style Library/ARUKTOM/Scripts/textfill.js" type="text/javascript">  </script>
            <script src="../Style Library/ARUKTOM/Scripts/jquery.bxslider.min.js" type="text/javascript">  </script>

       <script type="text/javascript">
    $(function() {
    $('#s4-workplace').hide();
    $(window).load(function(){
        $('#s4-workplace').show();
    });
});
</script>



    <link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/search.css?rev=T%2Bhraxktc1A8EnaG5gGMHQ%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=p63%2BuzTeSJc22nVGNZ5zwg%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/Style%20Library/ARUKTOM/styles.css"/>

    <script type="text/javascript"> var _fV4UI = true; </script>
    <script type="text/javascript">
// <![CDATA[
document.write('<script type="text/javascript" src="/_layouts/1033/init.js?rev=mnhGGwFP5YmS9WIiyvdiYQ%3D%3D"></' + 'script>');
document.write('<script type="text/javascript" src="/ScriptResource.axd?d=luuvfHc_f6cVsxKlIEFN5u77pe0bzWAGN9SntOwuatbrgMedj8xn4bO5hiR7XPMq_xv98fIxEgWDqfBWi0i_LXqy3MGrlUBmAQ6C12zl7GK9-amJGmKQOq_EEKE4pHpaSYXCC3Bm4AtCzwhMkMcqR26JSsc1&amp;t=2e2045e2"></' + 'script>');
document.write('<script type="text/javascript" src="/_layouts/blank.js?rev=QGOYAJlouiWgFRlhHVlMKA%3D%3D"></' + 'script>');
document.write('<script type="text/javascript" src="/ScriptResource.axd?d=bse3nu3CGBQBym8m6WVVdcAJMyeigyBxSU2xsz-_FWprGMMvVLspvIWaBplfHmlvGy1VgnjOBmDCR9g1Tv4cPx6vk6DW8_KlgIcLmwpujpLMfpdT_ZtAkD6wutK5Ff8KcF6jbESNGYdg-htWeqP7_6mEYdOwH773k1ju3elUAJiMeBpG0&amp;t=2e2045e2"></' + 'script>');
// ]]>
</script>
<link type="text/xml" rel="alternate" href="/_vti_bin/spsdisco.aspx" /><link rel="shortcut icon" href="/_layouts/images/favicon.ico" type="image/vnd.microsoft.icon" /><style type="text/css">
    .ctl00_wpz_0 { border-color:Black;border-width:1px;border-style:Solid; }

</style></head>

UPDATE

Somehow code below (in the master page) is adding the css files:

<asp:ContentPlaceHolder ID="Stylesheets" runat="server">

</asp:ContentPlaceHolder>  

<SharePoint:CssLink runat="server" Version="4"/>
<SharePoint:Theme runat="server"/>
<SharePoint:ULSClientConfig runat="server"/>

Any ideas?

  • It is possible it was applied to the site by using the Alternate CSS link in the Master page section of Site Settings. – Eric Alexander Sep 23 '15 at 13:45
  • change it in the site settings and select your master page and css to inherit the site changes. You can also make change and apply your masterpage as default using SharePoint designer. – SPLearner Sep 23 '15 at 14:02
  • Hi Would Alternate CSS link not show in the Master Page I have included in the post? – Raj Chahal Sep 23 '15 at 14:24
  • Hi In the site settings > Look and Feel the master page link is missing. – Raj Chahal Sep 23 '15 at 14:25
  • The master page only shows up under site settings for publishing sites. Even when it's not under settings, you can get to it directly using the URL: http://[yoursite]/_layouts/changesitemasterpage.aspx – Erin L Sep 25 '15 at 20:35
0

I think the previous developer accessed http://[yoursite]/_layouts/changesitemasterpage.aspx without the publishing feature on, as ERIN L suggests. This then renderes the new css in the section.

Because I want 2 master pages associated to different pages in the same site, I've manually removed CssLink section in the new master page and added the required css style sheets manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.