Apply custom master page for a new sub site in programming

Hi;
How Apply a custom master page for a new subsite ?
My code is as follows but it not working : the master page is not applied ?
SPWeb newSite = web.Webs.Add(name, name, name, Convert.ToUInt16(1036), "{815BF557-AFE0-42B4-92A1-A8A56011EDBF}#LaPoste.DTC.ModeleSite", false, false);
newSite.AllProperties["__InheritsCustomMasterUrl"] = "False";
newSite.CustomMasterUrl = "/_catalogs/masterpage/iDtc/iDtcGeneric.master";
newSite.AllowUnsafeUpdates = true;
newSite.Update();
Regards

try this:
foreach (SPWeb site in siteCollection.AllWebs) {
if (site.Title.ToString() == "Reporting Portal")
site.MasterUrl = WebAppRelativePath + "_catalogs/masterpage/Branding101.master";
//site.CustomMasterUrl = WebAppRelativePath + "_catalogs/masterpage/Branding101.master";
site.AlternateCssUrl = WebAppRelativePath + "Style%20Library/Branding101/Styles.css";
site.SiteLogoUrl = WebAppRelativePath + "Style%20Library/Branding101/Images/Logo.gif";
site.UIVersion = 4;
site.UIVersionConfigurationEnabled = false;
site.Update();

Similar Messages

  • How to set custom master page for sharepoint application page ?

    Hello,
    I need to apply custom master page for the custom application page I created for login purpose.
    Can anyone please let me know how to apply master page for custom application page ?
    Note : I need to set custom master page for application page at web application level.
    thanks,
    Dipti Chhatrapati

    Hi Dipti,
    You can use the same reference as ASP.NET
    Example
    "<%@ Page Language="C#" masterpagefile="../_catalogs/masterpage/minimal.master" title="teste" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full"
    meta:progid="SharePoint.WebPartPage.Document" %>"
    You can use SharePoint Designer 2010
    http://www.microsoft.com/download/en/details.aspx?id=16573 to make the reference from you aspx page to you custom masterpage.
    When you are editing a aspx page you can go to ribbon "Style" and attach the custom Masterpage.
    André Lage Microsoft SharePoint, CRM Consultant
    Blog:http://aaclage.blogspot.com
    Codeplex:http://spupload.codeplex.com/http://simplecamlsearch.codeplex.com/

  • Custom Master Page for Cases in eDiscovery

    We are creating eDicovery site using custom site template. Site gets created using custom master page that we have set. Now, there are two option to create New Case.
    #1. Use "Create New Case" button on Right Top Corner on home page
    #2. OR Go to cases link on Left hand side menu i.e. ('ViewCases.aspx'  page)
    Problem 1...
    this viewCases.aspx application page from _layouts uses seattle.master by default. how to change this?
    Problem 2...
    If we hover on "create" link on cases page, we see URL as [URL]/newsbweb.aspx?ID=3300.
    if we click on this link custom templates for creating cases are not visible. obviously, if I create case using OOB template it will use seattle.master page.
    If we remove ID=3300 from browser URL string and refresh, custom templates are available and I can create cases using custom template with my custom master page.
    interestingly, "Create New Case" button mentioned in #2 redirects to same page newsbweb.aspx but with no ID parameter and works fine.
    Please help how to set master page for viewCases page and what is this 3300 and how to remove it from create link.
    Thanking in advance in anticipation of useful pointers.
    ++

    By default SharePoint 2013 detects and display the content based on the mobile device. Refer to the following post on how to disable the default view and create a custom mobile view
    http://academy.bindtuning.com/deactivate-sharepoint-2013-mobile-view/
    Cheers,

  • Apply custom master page on a subsite

    Hi;
    I try to apply a custom master page on a new subsite but without success (any impact) :
    My code is :
    web.AllowUnsafeUpdates = true;
    SPWeb newSite = web.Webs.Add(name, name, name, Convert.ToUInt16(1036), template, false, false);
    newSite.Navigation.UseShared = true;
    newSite.AllProperties["__InheritsCustomMasterUrl"] = "False";
    newSite.CustomMasterUrl = curItem["SiteUrl"] + "/_catalogs/masterpage/rep/Generic.master";
    newSite.AllowUnsafeUpdates = true;
    newSite.Update();
    newSite.Close();
    Regards;

    hi,
    try this 
    SPSecurity.RunWithElevatedPrivileges(delegate
    using (SPSite objSPSite = new SPSite(SPContext.Current.Web.Url))
    using (SPWeb objSPWeb = objSPSite.OpenWeb())
    objSPWeb.AllowUnsafeUpdates = true;
    objSPWeb.MasterUrl = curItem["SiteUrl"] + "/_catalogs/masterpage/rep/Generic.master";
    objSPWeb.Update();
    objSPWeb.AllowUnsafeUpdates = true;
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • How to set custom master page for social/sites.aspx in sharepoint 2013

    How to set custom master page for social/sites.aspx in sharepoint 2013.?
    File path is
    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx
    Thanks in advance

    Hi,
    You could open the sites.aspx in Notepad or SharePoint designer, and set the master page to your own master page directly via editing:
    <%@ Page language="C#" MasterPageFile="~masterurl/custom.master"      Inherits="Microsoft.SharePoint.Portal.WebControls.FollowedContentWebPartPage,Microsoft.SharePoint.Portal,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c"
    %>
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Sharepoint 2013 - Error while applying custom master page.

    I am getting following error on my sharepoint 2013 site on applying a custom master page.
    System.ArgumentNullException: Value cannot be null.  Parameter name: ribbon    at Microsoft.SharePoint.WebControls.RibbonTrimmer..ctor(SPRibbon ribbon)     at Microsoft.SharePoint.WebControls.SPPageStateControl.OnInit(EventArgs e)
        at System.Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at Microsoft.SharePoint.WebPartPages.WikiEditPage.OnLoad(EventArgs e)    
    at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Does anyone know whats wrong with my custom master page?

    Hi,
    please check if its properly deployed.
    Refer the similar thread below.
    http://social.technet.microsoft.com/Forums/en-US/f07ce2f6-6607-4764-8c12-10de4ae1d635/systemargumentnullexception-value-cannot-be-null-parameter-name-ribbon?forum=sharepointgeneralprevious
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Applying custom master page on layout pages

    I am applying my custom master page on application layout pages which I am deploying using visual studio. My issue is; I have to copy my custom master page in the same directory where my layout pages exist otherwise its not working.
    I want to deploy my custom master in the default master page directory and refer it to my layout pages.
    is it possible or I have to copy my custom master page in the layout page directory ????

    Hi Nazish,
    By default your application pages will inherit the masterpage currently applied to the site where your app is hosted, but to specify a custom master on a app page you have to set the "CustomMasterURL" property on your site.
    Next your application page needs to inherit from the "LayoutsPageBase" class and you need to specify your custom masterpage on your application page with "~masterurl/custom.master"
    Regards, Pieter
    MCPD | MCITP
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

  • How to add left navigation to Custom Master page for Office 365

    Hi,
    I have created a master page using html, it looks good,
    But I could not see the left navigation, which I would like to have.
    below is my html page which converted to a master page:
    <?xml version="1.0" encoding="utf-8"?><!--SPG:
    This HTML file has been associated with a SharePoint Master Page (.master file) carrying the same name.  While the files remain associated, you will not be allowed to edit the .master file, and any rename, move, or deletion operations will be reciprocated.
    -->
    <!DOCTYPE html[]>
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
        <head>
            <meta http-equiv="X-UA-Compatible" content="IE=10" >
            <!--CS: Start Page Head Contents Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SID:00 -->
            <meta name="GENERATOR" content="Microsoft SharePoint" >
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" >
            <meta http-equiv="Expires" content="0" >
            <!--MS:<SharePoint:RobotsMetaTag runat="server">-->
            <!--ME:</SharePoint:RobotsMetaTag>-->
            <!--MS:<SharePoint:PageTitle runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server">-->
                    <!--MS:<SharePoint:ProjectProperty Property="Title" runat="server">-->
                    <!--ME:</SharePoint:ProjectProperty>-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:PageTitle>-->
            <!--MS:<SharePoint:StartScript runat="server">-->
            <!--ME:</SharePoint:StartScript>-->
            <!--MS:<SharePoint:CssLink runat="server" Version="15">-->
            <!--ME:</SharePoint:CssLink>-->
            <!--MS:<SharePoint:CacheManifestLink runat="server">-->
            <!--ME:</SharePoint:CacheManifestLink>-->
            <!--MS:<SharePoint:PageRenderMode runat="server" RenderModeType="Standard">-->
            <!--ME:</SharePoint:PageRenderMode>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:CustomJSUrl runat="server">-->
            <!--ME:</SharePoint:CustomJSUrl>-->
            <!--MS:<SharePoint:SoapDiscoveryLink runat="server">-->
            <!--ME:</SharePoint:SoapDiscoveryLink>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
                <!--MS:<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true">-->
                <!--ME:</SharePoint:DelegateControl>-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--MS:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server">-->
            <!--ME:</SharePoint:CssRegistration>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
                <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
                <!--ME:</WebPartPages:SPWebPartManager>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--CE: End Page Head Contents Snippet-->
            <meta name="viewport" content="width=device-width" >
            <!--DC:The Buzz - Team Site-->
            <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">https://rbcom.sharepoint.com/sites/cccdev1/_catalogs/masterpage/Master Page Gallery/team-site-test.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:ContentTypeId msdt:dt="string">0x0101000F1C8B9E0EB4BE489F09807B2C53288F0054AD6EF48B9F7B45A142F8173F171BD10003D357F861E29844953D5CAA1D4D8A3A006E1FBF9840A05D48B1698A21E9B5B94F</mso:ContentTypeId>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
        </head>
        <body id="test-100">
            <!--CS: Start Ribbon Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral,
    PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="wssucw" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>-->
            <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" HideFromSearchCrawler="true" EmitDiv="true">-->
                <div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
                    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return
    false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&lt;%$Resources:wss,master_turnonaccessibility%&gt;"
    EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
                <div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
                    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return
    false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&lt;%$Resources:wss,master_turnoffaccessibility%&gt;"
    EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
            <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
            <div id="ms-designer-ribbon">
                <!--SID:02 {Ribbon}-->
                <!--PS: Start of READ-ONLY PREVIEW (do not modify) --><div class="DefaultContentBlock" style="background:rgb(0, 114, 198); color:white; width:100%; padding:8px; height:64px;
    overflow:hidden;">The SharePoint ribbon will be here when your file is either previewed on or applied to your site.</div><!--PE: End of READ-ONLY PREVIEW -->
            </div>
            <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AnonymousUsersOnly">-->
                <!--MS:<wssucw:Welcome runat="server" EnableViewState="false">-->
                <!--ME:</wssucw:Welcome>-->
            <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
            <!--CE: End Ribbon Snippet-->
            <div id="s4-workspace">
                <div id="s4-bodyContainer">
                    <header>
                   <!----> <div data-name="ContentPlaceHolderMain">
                        <!--CS: Start PlaceHolderMain Snippet-->
                        <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
    Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                        <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderMain" IsMainContent="true" runat="server">-->
                            <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server">-->
                            <!--ME:</asp:ContentPlaceHolder>-->
                        <!--ME:</SharePoint:AjaxDelta>-->
                        <!--CE: End PlaceHolderMain Snippet-->
                    </div>
                </div>
            </div>
        </body>
    </html>
    Any suggestions here....
    Thanks in Advance.
    PMMR

    Hi,
    The Navigation control can be added into your HTML page in the Snippet Gallery:
    The two links below about how to create HTML master page and adding snippets needed into it for your reference:
    http://borderingdotnet.blogspot.jp/2012/12/how-to-create-html-masterpage-for.html
    http://msdn.microsoft.com/en-us/library/office/jj822370(v=office.15).aspx
    Feel free to reply if there still any question.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Custom master page for mobile view

    I would like to understand the below requirement: 
    Is SharePoint online mobile view uses a specific master page to show content in smart devices? If so is it possible to copy paste the same and add our html into that then map it with OOB mobile view?   
    Thank you for your help. 

    By default SharePoint 2013 detects and display the content based on the mobile device. Refer to the following post on how to disable the default view and create a custom mobile view
    http://academy.bindtuning.com/deactivate-sharepoint-2013-mobile-view/
    Cheers,

  • Search Box is not showing in custom master page

    Hi 
    I am using "Office 365 Enterprise E3 Trial"
    and have created a custom master page for my public SharePoint
    site .
    I have added Search snippet from the snippet gallery but the search
    box is not showing in the master page .I am not able to find the reasons .

    My Master page code is like bellow
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
        <head>
            <meta http-equiv="X-UA-Compatible" content="IE=10" xmlns="" />
            <!--CS: Start Page Head Contents Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SID:00 -->
            <meta name="GENERATOR" content="Microsoft SharePoint" xmlns="" />
            <meta http-equiv="Content-type" content="text/html; charset=utf-8" xmlns="" />
            <meta http-equiv="Expires" content="0" xmlns="" />
            <!--MS:<SharePoint:RobotsMetaTag runat="server">-->
            <!--ME:</SharePoint:RobotsMetaTag>-->
            <!--MS:<SharePoint:PageTitle runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server">-->
                    <!--MS:<SharePoint:ProjectProperty Property="Title" runat="server">-->
                    <!--ME:</SharePoint:ProjectProperty>-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:PageTitle>-->
            <!--MS:<SharePoint:StartScript runat="server">-->
            <!--ME:</SharePoint:StartScript>-->
            <!--MS:<SharePoint:CssLink runat="server" Version="15">-->
            <!--ME:</SharePoint:CssLink>-->
            <!--MS:<SharePoint:CacheManifestLink runat="server">-->
            <!--ME:</SharePoint:CacheManifestLink>-->
            <!--MS:<SharePoint:PageRenderMode runat="server" RenderModeType="Standard">-->
            <!--ME:</SharePoint:PageRenderMode>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="menu.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="callout.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false">-->
            <!--ME:</SharePoint:ScriptLink>-->
            <!--MS:<SharePoint:CustomJSUrl runat="server">-->
            <!--ME:</SharePoint:CustomJSUrl>-->
            <!--MS:<SharePoint:SoapDiscoveryLink runat="server">-->
            <!--ME:</SharePoint:SoapDiscoveryLink>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaPlaceHolderAdditionalPageHead" Container="false" runat="server">-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
                <!--MS:<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true">-->
                <!--ME:</SharePoint:DelegateControl>-->
                <!--MS:<asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server">-->
                <!--ME:</asp:ContentPlaceHolder>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--MS:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server">-->
            <!--ME:</SharePoint:CssRegistration>-->
            <!--MS:<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">-->
                <!--MS:<WebPartPages:SPWebPartManager runat="server">-->
                <!--ME:</WebPartPages:SPWebPartManager>-->
            <!--ME:</SharePoint:AjaxDelta>-->
            <!--CE: End Page Head Contents Snippet-->
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <!--DC:Two Tomorrows-->
           <link href="style1.css" rel="stylesheet" type="text/css" />
            <link href="slider.css" rel="stylesheet" type="text/css" />
            <!-- JS -->
            <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">//<![CDATA[!-->
            <script type="text/javascript" src="https://purplechannelltd-public.sharepoint.com/_catalogs/masterpage/DNV/js/jquery-1.10.2.min.js">//<![CDATA[
            //]]>
            </script>
            <script type="text/javascript" src="js/custom.js">//<![CDATA[
            //]]>
            </script>
            <script type="text/javascript" src="js/bjqs-1.3.min.js">//<![CDATA[
            //]]>
            </script>
            <script type="text/javascript" src="/Documents/clients_hover.js">//<![CDATA[
            //]]>
            </script>
            <script type="text/javascript" src="/Documents/jquery.backgroundSize.js">//<![CDATA[
            //]]>
            </script>
            <script type="text/javascript" class="secret-source">//<![CDATA[
            jQuery(document).ready(function($) {
              $('#banner-fade').bjqs({
                width       : 1600,
                height       : 377,
                responsive  : true
            //]]>
            </script>
            <script type="text/javascript">//<![CDATA[
    $(document).ready(function () {
        if((window.location.href=="https://purplechannelltd-public.sharepoint.com/")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/default.aspx")||(window.location.href=="https://purplechannelltd-public.sharepoint.com/Pages/default.aspx")
          $("#banner-fade").removeAttr("style");
          $("#BannerLine").removeAttr("style");
          $("#trBreadCrumb").css("display","none");
          $("#trNewsAndTraningHome").removeAttr("style");
          $("#trNewsOnly").css("display","none");
        else
         $("#banner-fade").css("display","none");
         $("#BannerLine").css("display","none");
         $("#trBreadCrumb").removeAttr("style");
         $("#trNewsAndTraningHome").css("display","none");
         $("#trNewsOnly").removeAttr("style");
        if((window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Services.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Key-issues.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Industries.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Clients.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/About-us.aspx")
        ||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/walking-the-talk.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/what-is-sustainability.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/our-team.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/assurance-code-of-conduct.aspx")
        ||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Contact-us-EMEA.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Contact-us-asia-pacific.aspx")||(window.location.href=="http://purplechannelltd-public.sharepoint.com/Pages/Contact-us-Americas.aspx")){
          $("#banner-fade").css("display","none");
         $("#BannerLine").css("display","none");
          $("#trBreadCrumb").css("display","none");
          $("#trNewsAndTraningHome").removeAttr("style");
          $("#trNewsOnly").css("display","none");
        if (window.location.href.indexOf("dnv-gl-launches-new-global-brand") >= 0 ||window.location.href.indexOf("how-future-proof-your-business") >= 0||window.location.href.indexOf("human-rights-time-walk-talk") >= 0 )
         $("#trNewsOnly").css("display","none");
        if($("#trNewsOnly").html().indexOf("Web Part Error:")>0)
        $("#trNewsOnly").css("display","none");
        if($("#trBreadCrumb").html().indexOf("Web Part Error:")>0)
        $("#trBreadCrumb").css("display","none");
            //]]>
            </script>
            <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:ContentTypeId msdt:dt="string">0x0101000F1C8B9E0EB4BE489F09807B2C53288F0054AD6EF48B9F7B45A142F8173F171BD10003D357F861E29844953D5CAA1D4D8A3A</mso:ContentTypeId>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignFromMaster msdt:dt="string"></mso:HtmlDesignFromMaster>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">https://purplechannelltd-public.sharepoint.com/_catalogs/masterpage/DNV/TT.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
        </head>
        <body>
            <!--CS: Start Ribbon Snippet-->
            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
            <!--SPM:<%@Register Tagprefix="wssucw" TagName="Welcome" Src="~/_controltemplates/15/Welcome.ascx"%>-->
            <!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" HideFromSearchCrawler="true" EmitDiv="true">-->
                <div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex" xmlns="">
                    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&#60;%$Resources:wss,master_turnonaccessibility%&#62;" EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
                <div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex" xmlns="">
                    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return false;">
                        <!--MS:<SharePoint:EncodedLiteral runat="server" text="&#60;%$Resources:wss,master_turnoffaccessibility%&#62;" EncodeMethod="HtmlEncode">-->
                        <!--ME:</SharePoint:EncodedLiteral>-->
                    </a>
                </div>
            <!--ME:</SharePoint:SPSecurityTrimmedControl>-->
            <div id="ms-designer-ribbon" xmlns="">
                <!--SID:02 {Ribbon}-->
                <!--PS: Start of READ-ONLY PREVIEW (do not modify) --><div class="DefaultContentBlock" style="background:rgb(0, 114, 198); color:white; width:100%; padding:8px; height:64px; overflow:hidden;">The SharePoint
    ribbon will be here when your file is either previewed on or applied to your site.</div><!--PE: End of READ-ONLY PREVIEW -->
            </div>
            <div id="s4-workspace" xmlns="">
                <div id="s4-bodyContainer">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" xmlns="http://www.w3.org/1999/xhtml">
                        <tr>
                            <td align="left" valign="top" class="headerLeft">
                            </td>
                            <td width="886" align="left" valign="top">
                                <div class="header">
                                    <a href="https://purplechannelltd-public.sharepoint.com/">
                                        <img src="images/logo.gif" width="189" height="109" alt="Logo" />
                                    </a>
                                    <h1>Sustainability Advisory Services
                                    </h1>
                                    <ul id="topNav">
                                        <li>
                                            <a href="http://purplechannelltd-public.sharepoint.com/Pages/About-us.aspx">About us
                                            </a>
                                        </li>
                                        <li>
                                            <a href="https://purplechannelltd-public.sharepoint.com/Pages/News.aspx">News
                                            </a>
                                        </li>
                                        <li>
                                            <a href="http://purplechannelltd-public.sharepoint.com/Pages/Contact-us.aspx">Contact us
                                            </a>
                                        </li>
                                    </ul>
                                    <!-- top nav -->
                                    <div style="right: 0px; ; color: rgb(0, 51, 153); font-weight: bold; top: 25px;">
                                       BUSINESS ASSURANCE
                                                                    </div>
                                    <!-- twitter -->
                                    <div class="twitterSec">RT @damidefelice: @edgeoftheocean Anna Turrel shows how @TwoTomorrows assesses corporate human right
                                    </div>
                                    <!-- twitter -->
                                    <!-- search -->
                                    <!--<form action="" method="get" id="search">
                                        <input name="" type="text" class="searchText"/>
                                        <input name="" type="image" src="images/search-icon.gif"/>
                                    </form>!-->
                                    <!-- search -->
                                    <!--ADD!-->
                                    <div id="search">
                                        <div data-name="SearchBox">
                                            <!--CS: Start Search Box Snippet-->
                                            <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint,
    Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
                                            <!--MS:<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox">-->
                                                <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><div class="ms-webpart-chrome ms-webpart-chrome-fullWidth
    "><div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPart" width="100%" class="ms-WPBody noindex " OnlyForMePart="true" allowDelete="false" style=""><div componentid="ctl00_SmallSearchInputBox_csr" id="ctl00_SmallSearchInputBox_csr"><div
    id="SearchBox" name="Control"><div class="ms-srch-sb ms-srch-sb-border" id="ctl00_SmallSearchInputBox_csr_sboxdiv"><input type="text" value="Search..." maxlength="2048" accessKey="S" title="Search..." id="ctl00_SmallSearchInputBox_csr_sbox" autocomplete="off"
    autocorrect="off" onkeypress="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {if (Srch.U.isEnterKey(String.fromCharCode(event.keyCode))) {$find('ctl00_SmallSearchInputBox_csr').search($get('ctl00_SmallSearchInputBox_csr_sbox').value);return
    Srch.U.cancelEvent(event);}})" onkeydown="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_SmallSearchInputBox_csr');ctl.activateDefaultQuerySuggestionBehavior();})" onfocus="EnsureScriptFunc('Search.ClientControls.js',
    'Srch.U', function() {var ctl = $find('ctl00_SmallSearchInputBox_csr');ctl.hidePrompt();ctl.setBorder(true);})" onblur="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_SmallSearchInputBox_csr'); if (ctl){ ctl.showPrompt();
    ctl.setBorder(false);}})" class="ms-textSmall ms-srch-sb-prompt ms-helperText" ><a title="Search" class="ms-srch-sb-searchLink" id="ctl00_SmallSearchInputBox_csr_SearchLink" onclick="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {$find('ctl00_SmallSearchInputBox_csr').search($get('ctl00_SmallSearchInputBox_csr_sbox').value);})"
    href="javascript: {}"><img src="https://purplechannelltd-public.sharepoint.com/_catalogs/theme/Themed/E97CFE0A/searchresultui-61174269.themedpng?ctag=7" class="ms-srch-sb-searchImg" id="searchImg" alt="Search" ></a></div></div></div><noscript><div
    id="ctl00_SmallSearchInputBox_noscript">It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.</div></noscript><div id="ctl00_SmallSearchInputBox"></div><div class="ms-clear"></div></div></div><!--PE:
    End of READ-ONLY PREVIEW-->
                                            <!--ME:</SharePoint:DelegateControl>-->
                                            <!--CE: End Search Box Snippet-->
                                        </div>
                                    </div>
                                    <!--ADDEND!-->
                                </div>
                            </td>

  • Create a custom Master Page in SharePoint Foundation 2013

    Hi,
    I am new to SharePoint foundation.
    I am trying to create a custom master page and save it as template, so that i can use it for all other sub sites. But i don't know where to start. Also i tries searching in Google, i got results for share point and not for share point foundation.
    So, Please give me a step by step procedure or a link to step by step procedure on how to create a master page, save it as template and use it for a sub site.
    Thanks in advance,
    Gowtham R

    Few points to note related to SharePoint Master page:
    You don't need to create master page template. If you deploy your master page in site collection level you can reuse the same master page in subsites without copying again and again, rather just by referencing
    You have not mentioned how you are going to deploy your master page. If you have any Visual Studio (VS) solution already, try to add your  master page in the VS solution and deploy your master page (and other branding components) as SharePoint WSP
    solution.
    Deploying master page will not activate the master page, you need to use some kind of 'Web Level Feature' to activate your branding - the feature will basically set the master page property of SharePoint site to your custom master page.
    Please follow the links below for steps by steps instructions (and you will find many just by googling 'sharepoint master page visual studio'):
    http://frederik.se/how-to-deploy-a-custom-master-page-in-sharepoint-2013-using-visual-studio/
    http://joshuaorimogunje.wordpress.com/2011/10/05/how-to-create-custom-master-page-for-sharepoint-2010-using-visual-studio-2010/
    http://blogs.msdn.com/b/bobgerman/archive/2011/01/31/packaging-master-pages-and-page-layouts-with-visual-studio-2010.aspx
    http://go.limeleap.com/community/bid/291931/Creating-a-Custom-SharePoint-Master-Page-with-jQuery-Using-Visual-Studio
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Custom Master Page Issue in Intranet

    Hi All,
    I hope someone can assist with this, we implemented this particular SharePoint 2007 portal approximately 5 years ago.  An outside consultant created this custom master page, for some reason out of nowhere we are experiencing this bizarre issue with
    the master page and checking in and out documents. I have attached an image showing the error message being displayed below(couldn't attach until my account was verified but it states 'Error invalid viewstate, port 52208, user agent Mozilla/4.0..., viewstate,
    referrer, path).  I came across one source on the web that stated something about the search box code and it causing issues out of nowhere on the master page.  So in my dev environment I made the change and removed the following code from the master
    page below.
    <td style="padding-top:8px;" valign=top>
                <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
                <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/>
                </asp:ContentPlaceHolder>
    </td>
    As soon as this code is removed and the page is published again everything begins to work again, the problem is I can't remove search from this intranet portal as it is heavily used.  Any assistance would be greatly appreciated.

    By any chance, do you still have access to the solution package in which the master page was contained? Normally, you would see another .ascx user control overriding the delegate search control in there. I'm almost positive that this custom control is
    what causing this issue.
    Nikolas Charlebois-Laprade Microsoft Certified Professional & Software Engineer http://nikcharlebois.com

  • Custom Master page

      how to apply  custom master page site setting page in sharepoint2007 it's passible or not.

    Hello,
    Since layout page inherited from application.master page so your custom master page won't apply to settings page. You can use HHTPmodule to overwrite that master page:
    http://stephenkaye.blogspot.in/2008/03/how-to-customise-applicationmaster-file.html
    http://nikpatel.net/2009/12/20/moss-2007-implementing-the-custom-application-master-page-using-httpmodule/
    If you just want to change the color of links then you can also try with different theme.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • SharePoint O365 Tenant - Custom Master Page Question

    Hi guys,
    I setup a custom master page for a client and currently they have been very happy with it, although due to recent changes in the suit bar(the app launcher button) we had to move some design around on the page so that everything rendered properly.  As
    a result I had to use a method that is not the common practice and place all the code for the custom navigation bar, and logo right below the <body> tag and before the "<!--SPM:<SharePoint:ImageLink
    runat="server"/>-->" tag in order for things to render in the way they are requesting.  As a result of this the added code is displaying on top of every popup window as well as full page.  We only want it to display
    at the top of main pages.  In the attached image you will see that the page has a popup box for adding something to the calendar.  I attempted to edit the NewForm.aspx for Calendar List Item, but i was not able to find anything of use.  I even
    attempted to hide the div that holds all the code for the top bar via the NewForm.aspx but it was a no go.  Please advise on what I can do or weather i can attach a class of some sort to the div that would make this dynamic and hide on pop up pages.
    Thank You

    ***Update***
    I managed to figure out a solution to this problem.  I simply added the right class to it so its no longer in dialog boxes
    class="s4-notdlg noindex"

  • Change site master page not working in team site

    For an intranet site I have a heavily customized master page but want to retain the default v4 master for admin pages. I haven't activated publishing for the site but can access changesitemasterpage.aspx and set the site and system master page.
    Action:
    Set site master to custom, set system master to v4
    Expected result:
    Exactly what the description says:
    "The system master page will be used by administrative pages, lists, and document library views on this site."
    Actual result:
    ALL pages use the v4 master.
    The only way to get the custom master to work is to change the system master setting to "custom".  But then the styling interferes with the functionality of the admin pages. Is this another case of SP not doing what it says it's going to do,
    or is it broken?

    Hi  ,
    For your issue, there are two approaches you can refer to:
    1.Activate publishing feature, set custom master page for “Site Master Page”. The site master page will be used by all publishing pages - the pages that visitors to your website will see.
    2.Go to  C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS,  you can find all the application pages in the folder (such as settings.aspx) . Open the aspx page
    and find the dynamicMasterPage attribute at the page tag, change the value to default.master instead of custom.master. (not recommend)
    Reference:
    http://social.technet.microsoft.com/Forums/en-US/93611bbb-e9b1-4ec0-8011-5b6fbc4e8b2c/change-master-page-in-team-site-in-share-point-2010?forum=sharepointcustomizationprevious 
    http://msdn.microsoft.com/en-us/library/office/ee537530(v=office.14).aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

Maybe you are looking for