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” />


2 Comments Add yours

  1. Sara says:

    Thanks! This is just what I needed!

  2. Papageno Sweden says:

    Exellent. Thanks!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s