Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to change the way a <title> displays. Currently it just displays the page name in most cases "Home". What I would like it to look like is "Site Collection Name - Page Name" It seems to work fine when I'm working with non-publishing sites and I noticed both use the same master page tag <title id="onetidTitle"><asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/></title>

So far the things I've tried:

  1. Adding a title in the SharePoint Page Properties (<--Doesn't Show up anywhere)
  2. Adding the title manually before the <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/> (<-- Also didn't get recognized after publishing)
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I also noticed that if you put some value before the placeholder in master page, it does not work. However, in your page template, if you put something like below, it will show title of the web and title of the page.

<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
    <SharePoint:ProjectProperty runat="server" id="ProjectProperty1" Property="Title" /> - <SharePoint:fieldvalue id="PageTitle" FieldName="Title" runat="server"/>
</asp:Content>

Please note that control shown above displays current web’s title, if you have to write a custom control.

share|improve this answer
    
That did the trick, thanks Ashish –  user5991 Jan 17 '12 at 23:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.