Tag Info

Hot answers tagged

2

Master page gallery is present in the root web of the site collection. So, whether a master page is applied to a root site or any sub site, it is the server relative url of the root site collection which is needed. Consider that you have a sub site under the root site collection: http://aissp2013/sites/pub/s1. Here is the code to apply master page to it: ...


2

using (var ctx = new ClientContext( url )) { var web = ctx.Web; var masterPageUrl = String.Format( "{0}/_catalogs/masterpage/SPCCapatech/FullWidth_SideBar.master", ctx.Web.ServerRelativeUrl ); web.MasterUrl = masterPageUrl; web.CustomMasterUrl = masterPageUrl; web.Update(); ctx.Load( web ); ctx.ExecuteQuery(); } ...


1

You can still modify the .master file as you could in past versions, although the preferred way is through the .html file. Tools such as SharePoint Designer still support that, but beware of unghosting/customizing the file because it'll lose synchronization with the .master file in the 15 hive.



Only top voted, non community-wiki answers of a minimum length are eligible