views:

239

answers:

3

Hi,

I'm trying to display the page title (html title) on the default.aspx page of a custom site template. The template is based on a MOSS team site template.

But the html page title is rendered empty. Can I change the code in the default.aspx and/or the sites master page to define the title myself? Details of the deafult.aspx and default.master page as below: Thanks.

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>

default.master

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

If you have Sharepoint Designer, then its matter of fiew clicks to modify page title.

Manoj
I do have SP designer. Could you elaborate please?
nav
A: 

I'm not sure a understand your problem, but have you tried to enter your title like this in your .aspx file:

<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
This is my title</asp:Content>

Or am I missing something obvious here? Do you want to do it in code?

You maybe also have stumbled upon this bug. (although it's Ajax specific)

2 additional things: Have you checked-in, published and approved the master page? Have you checked in the .aspx page?

Magnus Johansson
Hi, this did not work the URL is still bought accross as the title even after changing the default master page as below...:<Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server">Title</asp:ContentPlaceHolder></Title>
nav
@nav. You should do it in your .aspx file, not the master page file.
Magnus Johansson
@nav. I added a suggestion in the link.
Magnus Johansson
thanks the page is not doing any AJAX postbacks. The problem seems to be that no title is rendered in the html. I have changed the title in the aspx. file but all this does is change the title of site on the page rather than that displayed on the top of the browser window - (the html title element)....
nav
I checked the Master page the site was inheriting which was the site template master page. I change the title tag to display the site title using the Sharepoint ProjectProperty tag and property title. <Title ID=onetidTitle> <asp:ContentPlaceHolder id=TSM_PlaceHolderPageTitle runat="server">Parent Site Ttitle- <SharePoint:ProjectProperty Property="Title" runat="server"/></asp:ContentPlaceHolder></Title>
nav
A: 

I checked the Master page the site was inheriting which was the site template master page. I change the title tag to display the site title using the Sharepoint ProjectProperty tag and property title.

<Title ID=onetidTitle> <asp:ContentPlaceHolder id=TSM_PlaceHolderPageTitle runat="server">Parent Site Title- <SharePoint:ProjectProperty Property="Title" runat="server"/></asp:ContentPlaceHolder></Title>
nav