Customizing MOSS Page Title

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):

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

And this is the replacement in default.aspx:


  

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 12CONFIGResources (under the base 12 folder) rather than the more obvious 12RESOURCES. 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:inetpubwwwrootwssVirtualDirectoriesApp_GlobalResources. There I found another copy of the wss.resx file, and changing the value there instantly updated the site, no IISRESET necessary. Joy!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.