Tag Info

Hot answers tagged

5

Use the MasterUrl and CustomMasterUrl properties of Web: using (var ctx = new ClientContext( url )) { var web = ctx.Web; var masterPageUrl = String.Format( "{0}/_catalogs/masterpage/oslo.master", ctx.Web.ServerRelativeUrl ); web.MasterUrl = masterPageUrl; web.CustomMasterUrl = masterPageUrl; web.Update(); ctx.Load( web ); ...


3

Create an Event Receiver. In Visual Studio, right click project => Add new item => Event Receiver => Web Events, Handle the following events: A Site is being provisioned. The following override will be generated and fire on every new site creation. Just insert the code within: public override void WebProvisioned(SPWebEventProperties properties) { ...


2

Your user control needs to target a delegate control placed in the page body not AdditionalPageHead. AdditionalPageHead targets the html head element and is used for adding additional things to the head, like css and javascript files. A delegate control in the body is the appropriate place for an asp:button to live. So within the masterpage, you would ...


1

In new versions of SharePoint the new masterpages often contains elements of the masterpages from the previous version of SharePoint to support upgraded sites so no functionality is lost. This element is the legacy statusbar from SharePoint 2010. DeltaPageStatusBar is the one used in SharePoint 2013, making the legacy statusbar redundant. It causes no harm ...


1

this container is for displaying status informations. And you are right with your research that also information about the page status (e.g. checked out or checked in) will displayed. This is a system element of the Masterpage structure and I think required. In cause of this, it is not good or recommended to remove or rename the element. SharePoint 2013 ...


1

When you upload a Master page, you need to choose "Publishing Master Page" content type. By doing so SharePoint Designer would able to list it out in "Master". Step to upload: Site settings -> Master pages and page layouts Upload your master page, a property window will pop up. Pick "Publishing Master Page" as content type.


1

You haven't added your control. You've just registered it. After the registration you need to add another line like so: <!--SPM:<LogOut:LogOutUserControl id="LlgOutUserControl" runat="server" />-->


1

The probably simplest method would be to add the following CSS to your masterpage, assuming your custom searchbox has an HTML element ID of #Searchbox: <style> #aspnetForm[action*="settings.aspx"] #SearchBox, #aspnetForm[action*="addanapp.aspx"] #SearchBox { display: none; } </style>


1

The relationship between .html and .master is a bridge. It has been implemented so that developers who are not familiar with ASP.NET masterpages and SharePoint can use the .html file to do the changes in a "environment" they are more or less familiar with. I'm going to assume this is an on-premise solution, so yes, downloading and putting the .js file in ...


1

If your comments are an actual script tag in your master page - you have a syntax error on your master page which will kill all the rest of the javascript on the page. You're missing a dot and javascript is case sensitive, so you need 'document.getElementsByName' not 'documentGetElementsByName' var logoImg = document.getElementsByName(...) I'm also ...


1

Aside from any API calls, why not just modify the master pages to include some javascript that sets a variable telling which master it is Var master="masters?asps"



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