Customizing MOSS Page Title

Tags: SharePoint

Another odd client request that came in a while ago.

When we browse our Sharepoint site, IE's title reads "Home - My Site Name - Windows Internet Explorer". We can't find any way to remove the "Home" string, regardless of how we change the site's name. This is critical for our ISO review tomorrow!

Now, I'm no ISO reviewer, but it seems a bit excessive even for the strictest ISO test. But hey, I'm just your friendly neighborhood technical solutions provider.

The first step to changing it is to understand where this string is stored. Easiest way to do that is to open the default.aspx page with Sharepoint Designer. We can see it contains a content block that replaces the master page's Title content placeholder.

This is the master page bit (line 14 on my unedited default.master):

<Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/></Title>

And this is the replacement in default.aspx:

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
 <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,multipages_homelink_text%>"
       EncodeMethod="HtmlEncode"/>
-
 
<SharePoint:ProjectProperty Property="Title" runat="server"/>
</asp:Content>

We can see that the title is made up of two parts, the localized "Home" string (in red) and the current site's name (in blue) taken from the site's properties. We have two options here - we can either find the resource string and change it, or remove it from the ASPX altogether (along with the connecting dash) and have a clean page title. The second option is pretty straightforward, so we'll focus on the first:

text="<%$Resources:wss,multipages_homelink_text%>" 

We can see that the actual text is retrieved from some Resource Manager. The format of the $Resources token is as follows:

$Resources:filename,localizedString

So what we need is the string "multipages_homelink_text" under the file wss.resx. Finding it, however, took me a while. I found the file under 12\CONFIG\Resources (under the base 12 folder) rather than the more obvious 12\RESOURCES. This folder contained wss.resx, and also wss.en-US.resx and wss.he-IL.resx, the two languages I had installed. Seemed fitting. Editing the multipages_homelink_text value in them, however, didn't seem to change anything. So I expanded the scope again.

Seems that resx files in the 12 directory are only template files, copied to each specific Virtual Server when its created. From there on, the virtual server has its own copy of the resx files, residing under C:\inetpub\wwwroot\wss\VirtualDirectories\<port>\App_GlobalResources. There I found another copy of the wss.resx file, and changing the value there instantly updated the site, no IISRESET necessary. Joy!

73 Comments

  • Bob C said

    My moss sites all have a title of default.aspx or similar. The value is set in the site admin title setting, but is not coming through on the rendered page. Any thoughts?

  • Bob C said

    The code was not correct in my DefaultLayout.aspx. This site was based on a beta, so perhaps this was just a vestage from that older WSS v3 build. It was: Changed to: <SharePoint:EncodedLiteral runat="server" text="" EncodeMethod="HtmlEncode"/> -

  • Bob C said

    I fixed the issue by creating a basic Team subsite (which had correct page title logic), and reapplied my template. If there had been more content, it would have been a bigger issue, but it is working now. I am wondering how modifying pages (via SPDesigner) will affect this...

  • Guest said

    I didn't understood how to do this. can you pls guid me step by step. I tried it by replace those lines in master pages but it is throwing an error.

  • AutoSponge said

    I couldn't get the resource file changes to show up on my pages, so I decided to edit the master page. If you are editing the master page, the contentPlaceHolder, PlaceHolderPageTitle needs to be in the page somewhere otherwise you get an error on render. However, this does not mean that you have to keep it as the title. 1. Copy the code between the tags. 2. Paste the code after the tag and wrap it in a with style="display:none;" 3. Put your own title where the original code was.

  • Karadas said

    This is a very usefull information. I have been thinking to have two different master pages; 1 with english menus and 2nd with arabic menus. But luckly, this give me a big relax

  • Suresh said

    Sir/Friends, I have the same problem. I am trying to remove the title -Home from my default.aspx page which is my Home Page of Personalisation Site Template. Its not getting changed as you said from wss.resx . I want nothing to be displayed on my title area. Can anyone help. Thanks in advance Regards, Suresh

  • Matt Canty said

    Great Article, this definitely helped me to understand WSS managed resources, however, I'm assuming (maybe incorrectly) that changing this file directly is not a good idea. for example, a crazy sharepoint patch or hotfix is released that "undoes" the changes to this file, or 2) you call Microsoft for support, they say "I'm sorry, this installation is no longer supported". Is there a way to create a custom resource file and point your custom.master (that you create from a copy of your default.master and rename) toward? I would think this would keep the above mentioned pitfalls in check. I am glad and very excited that you posted this article, it helped me tons! Thanks, Matt

  • CustardCrumble said

    Just found a way (trial and error, so no explanation of why it works!) to change the page title of a Basic Page: I opened the page in SP Designer and changed line 3 - <SharePoint:encodedliteral runat="server" text="" EncodeMethod='HtmlEncode'/> to read Works for me... hope it helps. CC

  • Michel said

    Yes this works great. In our site the deafult webpage, when created somewhere else and then set to be the homepage, needed to have this code - -----------------changed to this code--------- <SharePoint:EncodedLiteral runat="server" text="" EncodeMethod="HtmlEncode"/> -

  • blower said

    We should be chary and perceptive in all the advice we give. We should be especially prudent in giving opinion that we would not think of following ourselves. Most of all, we ought to refrain from giving recommendation which we don't imitate when it damages those who woo assume us at our word.

  • karcher said

    We should be meticulous and perceptive in all the information we give. We should be extraordinarily aware in giving opinion that we would not about of following ourselves. Most of all, we ought to refrain from giving recommendation which we don't tag along when it damages those who transport us at our word.

  • Marry said

    In harry's sustenance, at some dated, our inner throw goes out. It is then break asunder into passion beside an be faced with with another magnanimous being. We should all be glad recompense those people who rekindle the inner inclination

  • Alice said

    In everyone's time, at some dated, our inner throw goes out. It is then break asunder into passion at hand an be faced with with another benign being. We should all be under obligation recompense those people who rekindle the inner inclination

  • Jane said

    I don't like the earshot of all those lists he's making - it's like prepossessing too many notes at high school; you sense you've achieved something when you haven't.

  • Bob said

    I don't like the sound of all those lists he's making - it's like intriguing too innumerable notes at school; you experience you've achieved something when you haven't.

  • Aisha said

    In the whole world's life, at some time, our inner foment goes out. It is then break asunder into zeal at near an be faced with with another human being. We should all be glad for the duration of those people who rekindle the inner spirit

  • Mark said

    In everyone's sustenance, at some time, our inner throw goes out. It is then blow up into flame by an face with another hominoid being. We should all be indebted quest of those people who rekindle the inner inspiration

  • Mark said

    In harry's time, at some dated, our inner pep goes out. It is then blow up into flame at hand an encounter with another human being. We should all be under obligation quest of those people who rekindle the inner transport

  • Jane said

    In everyone's existence, at some time, our inner throw goes out. It is then burst into passion by an contend with with another magnanimous being. We should all be thankful recompense those people who rekindle the inner transport

  • Mark said

    In harry's existence, at some dated, our inner foment goes out. It is then bust into passion at near an face with another magnanimous being. We should all be glad for those people who rekindle the inner inspiration

  • Anna said

    In the whole world's sustenance, at some time, our inner throw goes out. It is then blow up into zeal by an encounter with another magnanimous being. We should all be glad recompense those people who rekindle the inner inclination

  • Niels said

    In everyone's sustenance, at some pass‚, our inner foment goes out. It is then blow up into enthusiasm by an encounter with another human being. We should all be glad for those people who rekindle the inner transport

  • Mark said

    In every tom's time, at some pass‚, our inner fire goes out. It is then burst into passion beside an contend with with another benign being. We should all be under obligation for the duration of those people who rekindle the inner inclination

  • Marry said

    In the whole world's time, at some pass‚, our inner fire goes out. It is then bust into flame beside an encounter with another hominoid being. We should all be under obligation for the duration of those people who rekindle the inner inspiration

  • Jack said

    In everyone's life, at some pass‚, our inner throw goes out. It is then bust into zeal beside an be faced with with another benign being. We should all be thankful quest of those people who rekindle the inner spirit

  • Aisha said

    In harry's existence, at some occasion, our inner pep goes out. It is then break asunder into enthusiasm beside an be faced with with another human being. We should all be glad quest of those people who rekindle the inner inspiration

  • Marry said

    In everyone's existence, at some occasion, our inner pep goes out. It is then break asunder into passion at near an contend with with another benign being. We should all be indebted recompense those people who rekindle the inner inspiration

  • Mark said

    In the whole world's existence, at some dated, our inner throw goes out. It is then break asunder into zeal beside an encounter with another magnanimous being. We should all be thankful recompense those people who rekindle the inner inspiration

  • Marry said

    In every tom's sustenance, at some time, our inner foment goes out. It is then bust into flame beside an encounter with another hominoid being. We should all be under obligation recompense those people who rekindle the inner spirit

  • Mark said

    In harry's life, at some occasion, our inner throw goes out. It is then burst into enthusiasm beside an be faced with with another hominoid being. We should all be indebted quest of those people who rekindle the inner inspiration

  • Alice said

    In harry's time, at some time, our inner pep goes out. It is then blow up into passion by an face with another magnanimous being. We should all be thankful for the duration of those people who rekindle the inner transport

  • Mark said

    In every tom's time, at some time, our inner pep goes out. It is then bust into enthusiasm at near an contend with with another magnanimous being. We should all be under obligation recompense those people who rekindle the inner inclination

  • Alice said

    In the whole world's time, at some pass‚, our inner throw goes out. It is then blow up into passion beside an face with another human being. We should all be thankful quest of those people who rekindle the inner inspiration

  • Niels said

    In the whole world's existence, at some occasion, our inner pep goes out. It is then burst into zeal by an contend with with another magnanimous being. We should all be glad for the duration of those people who rekindle the inner inspiration

  • Anna said

    In harry's sustenance, at some pass‚, our inner pep goes out. It is then break asunder into flame at hand an contend with with another hominoid being. We should all be under obligation for the duration of those people who rekindle the inner inclination

  • Anna said

    In the whole world's existence, at some time, our inner throw goes out. It is then break asunder into flame at near an face with another magnanimous being. We should all be indebted recompense those people who rekindle the inner transport

  • Makita said

    A comfortable noachian maturity is the award of a well-spent youth. As a substitute for of its bringing wretched and woebegone prospects of decay, it would give in to defeat us hopes of unchanged lad in a better world.

  • sklep_jezdziecki said

    oficerki warszawa sklep jezdziecki sprzet jezdziecki sklepy jezdziecki komis jezdziecki siodla prestige oglowia veredus siodlo kaski jezdzieckie siodlo kaski jezdzieckie buty do jazdy konnej sklep jezdziecki warszawa akcesoria jezdzieckie akcesoria jezdzieckie

Comments have been disabled for this content.