I'm struggling to find a walkthrough that shows me how to do this in SP2013.
I am using the html-generated master page to do edits.
I tried the snippit generator and SP Designer but with no luck :(
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
You have to switch to an ASP.net master page. All placeholder that are unknown to SharePoint will be removed during the conversation from the html master page to the asp.net master page.
The registration can be done using the following tags:
<asp:ContentPlaceHolder id="NewPlaceHolder" runat="server"> </asp:ContentPlaceHolder>
I found an article with a successful solution for this! The article is from one Ben Haynes. Here's the link and the text from his post. It works for me.
Having problems today working with overriding ContentPlaceHolders in the brave new world of HTML and Master Pages/Page Layouts. Firstly how to add the content place holder into the Master Page into a place that SharePoint will utilise it and not put it into the bottom of the page.
To do this you need to add the following to the HTML Master Page in the HTML where you want the PlaceHolder to sit:
<!--CS: Start PlaceHolderUtilityContent Snippet--> <!--SPM:<%@Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=18.104.22.168, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>--> <!--MS:<SharePoint:AjaxDelta ID="DeltaPlaceHolderUtilityContent" runat="server">--> <!--MS:<asp:ContentPlaceHolder ID="PlaceHolderUtilityContent" runat="server">--> <!--ME:</asp:ContentPlaceHolder>--> <!--ME:</SharePoint:AjaxDelta>--> <!--CE: End PlaceHolderUtilityContent Snippet-->
SharePoint will recognise this and not put the ContentPlaceHolder as empty at the bottom.
So how do you add content into this in your HTML page layout. Just add an override right? e.g.
<!--MS:<asp:ContentPlaceHolder ID="PlaceHolderUtilityContent" runat="server">--> <div>someothercontent</div> <!--ME:</asp:ContentPlaceHolder>-->
Well this will not work. What you have to do is tell the page that the ContentPlaceHolder is being utilised in the Page Layout. This is done in the sections. You need to add two properties firstly (Below the equalivant for Place Holder Main):
Now your override will work!