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:
[js]<script type="text/javascript">
$(document).ready(function() {
document.title = ‘My Blog’;
});
</script>[/js]
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”.
Do you really want to add a Content Editor to every page?
No, not at all. This is more of a one-off thing. If this needed to be accomplished on all pages, I would write a custom solution that adds a “Page Title” column to the pages library and set the page title programmatically using the AdditionalPageHead control.
How can I make this correction in SharePoint 2013?
John,
Thanks for the post. This helped me come up with
$(document).ready(function() {
document.title = document.title.slice(8, document.title.length)
});
It’s a hack fix, but a fix nonetheless.
Awesome! I already had CEWP with JQuery and JavaScript running on every page. Exactly what I needed. Works perfectly.