Skip to: Site menu | Main content

I know stuff!

In web development and programming, I often come across useful tidbits that solve a problem for me. I often have those problems again and can't remember that tidbit. Now I will. Maybe you can benefit too.

WSS 3.0 - Change Basic Page Title
Published: 4/8/2008 by mr.dossett

If you create a basic web page in WSS 3.0, the page title in the browser title bar just shows up as "Basic Page".   You can change this on a per file basis using SharePoint Designer, but you can also make a change system-wide.

My solution was to edit the template file for basic pages located at:

drive:\Program Files\Common Files\Microsoft Shared\web server extensions _
\12\TEMPLATE\1033\STS\DOCTEMP\BLANKPGS\pstd.aspx

Locate the section at the top:

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
... </asp:Content>

Replace it with:

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
    <SharePoint:ListItemProperty runat="server" Property="Page_x0020_Title" 
       id="ListItemProperty1"/>
    - <SharePoint:ProjectProperty Property="Title" runat="server"/>
</asp:Content>

Finally, in the document library where you're going to store your basic web pages, create a new column called "Page Title".  Now when you create a new basic web page, fill in this column with what ever you want the title to be.  The result is that you'll end up with a page title of "Value of Page Title Column - Site Name".  The Site Name comes from whatever you specified as the title of your site.  You can of course change the title elements to be whatever you want, but this worked for my purposes. 

Pros:  Pages end up with a logical page title with a fairly easy process.  Easy for normal users to update the page title without the use of SharePoint Designer.

Cons:  This is server wide, so will affect all sites on a server.  But at least if you use pages in a library where there is no "Page Title" column it will still show the site name in the title which is still better than "Basic Page".

Relevant Tags: SharePoint

Comments:

 

Gravatar On 2/3/2010 6:49:59 AM, antletter said:
Changing the default file had no effect on my site. This only seems to work on a per file basis. Thanks... This helped me understand a little more about how page titles work in WSS.

Gravatar On 5/24/2010 8:27:13 AM, mr.dossett said:
I just did this again on another SharePoint installation and it worked as described. If you've previously edited your page and un-ghosted it (made it no longer inherit from the default template), then this change would not affect the page.

Add a Comment:








(Note: I reserve the right to remove any comments I deem not worthy.)