Better page titles in SharePoint

When working with multiple browser windows open its hard to tell one from the other because most SharePoint pages don’t offer a useful title. So in most cases you will see something like this (I am using the dreaded IE 6 unfortunately). As you can see most SharePoint pages only show the title of the page. On the home page of some sites the site name is shown as well.

Useless Page Title

Useless Page Titles

Ideally the page title should not only tell you the title of the page you are looking at but also what site you are on. Chris Coyier of CSS-Tricks talks more about different options in this post. After some experimenting I was able to get this working in SharePoint.

Find the following tag in your page layout.

<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">

Out of the box this tag and its contents just show the title of the current page. Put the code below inside the asp:Content tags.

<SharePointWebControls:ProjectProperty runat="server"  id="ProjectProperty1" Property="Title" /> : <SharePointWebControls:FieldValue id="HomePageTitleInTitleArea" FieldName="Title" runat="server"/>

Now your page title should be something like this
Site Name : Page Title
Which is far more useful when you have multiple windows open.

Add a Comment

Your email address will not be published. Required fields are marked *