Adding Additional Styles/JavaScript Per SharePoint Page Layout


One of the most utilised placeholders within SharePoint is the “PlaceHolderAdditionalPageHead”, this allows HTML to be input into the head of the page. This is particularly useful if you only need to reference a JavaScript file for a control that is only on one type of page layout, or if you need to reference additional CSS files so you can change the branding per page layout rather than per site.

The example below shows how to reference an additional CSS file on a page layout.

<asp:Content ContentPlaceholderID=”PlaceHolderAdditionalPageHead” runat=”server“>
<link rel=”stylesheet” type=”text/css” href=”/_layouts/Styles/HomePage.css” />
</asp:Content>

2 Comments Add yours

  1. Sara says:

    Thanks! This is just what I needed!

  2. Papageno Sweden says:

    Exellent. Thanks!

Leave a comment