SharePoint 2007 – JQuery to Fix Ugly Page Titles

One thing that I have always found quite annoying in SharePoint 2007 is that content page titles are ugly.  For instance, if I create a new Web Part Page and give it the title “My Blog” with the URL “/pages/my_blog”, the title of the page in the browser ends up being “Pages – my_blog”.  Quick ugly and not very user-friendly.

One solution to the issue that I have been using is setting the page title using JQuery.  I have the JQuery library referenced in my Master Pages and I add the following into the Edit Source view of a blank Content Editor Web Part:

<SCRIPT type=text/javascript>
	$(document).ready(function() {
		document.title = 'My Blog';
	});
</SCRIPT>

Just note that this does not affect how search engines see the title of the page. Since they do not render the JQuery, they will still see the “Pages – my_blog”.

  • Share/Bookmark
Print

Facebook Comments

No comments yet.