Monday, February 24, 2014

Adding Controls to the Additional Page Head in Sharepoint 2010

I wanted to add a control that would add some html to site collection administration pages.  These pages are not directly editable.

I looked at adding controls to the additional page head tag within the master page.  The control in the master page looks like

<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>

To the project add a new module

edit the elements.xml and add in your control

 <Control Id="AdditionalPageHead" ControlSrc="~/_CONTROLTEMPLATES/yourcontrol" Sequence="15100" xmlns="" />

The sequence number is just a random number.

Now your control will be added to all pages that use the masterpage.  Just place some conditional logic in your control looking for the site collection addition page and there you have it

No comments:

Post a Comment