提出问题提出问题
 

已答复SEO in SharePoint

  • 2008年7月14日 16:22SteinerTCU 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

     

    I'm looking to optimize my websites search engine visibility. it was build with SharePoint using page layouts etc. Now, my question is, where can I input meta tags and page title etc? For instance, I put the home page with the title of "My Company - Home" but it shows up as the web address http://www.mycompant.com/Pages/default.apsx, so how can i fix that if in the page settings, it seems right.


    I'm hoping that I am just missing something simple, but any help would be appreciated.

    Thank you very much.

     

答案

  • 2008年7月16日 3:58Lambert QinMSFT, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复

    Yes, you can add your customized title to the page by SharePoint Designer 2007.

    Here are the detailed steps:

    1.     Open your site in SharePoint Designer 2007

    2.     Open the page you want to modify (e.g.: default.aspx) and change to Code View, navigate to the PlaceHolderPageTitle in the top of the page. And add your customer code in the tag.

     

    Code Snippet

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

     

    3.     If you want to add a customized title to all the pages, you can modify the default.master file in _catalogs\mastepage folder. Navigate to the Title tag in the Head tag, and add your customer code in the Title tag.

     

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

     

     

    Let me know if you have any further questions.

    -lambert

全部回复

  • 2008年7月14日 17:27Robert Stark 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

     

    If that is the URL in your web application then you will need to change it in the Alternate Access mappings in Central Admin - Operations.
  • 2008年7月14日 18:15SteinerTCU 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     

    That was just a sample URL I put in there.....

  • 2008年7月16日 3:58Lambert QinMSFT, 版主用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     已答复

    Yes, you can add your customized title to the page by SharePoint Designer 2007.

    Here are the detailed steps:

    1.     Open your site in SharePoint Designer 2007

    2.     Open the page you want to modify (e.g.: default.aspx) and change to Code View, navigate to the PlaceHolderPageTitle in the top of the page. And add your customer code in the tag.

     

    Code Snippet

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

     

    3.     If you want to add a customized title to all the pages, you can modify the default.master file in _catalogs\mastepage folder. Navigate to the Title tag in the Head tag, and add your customer code in the Title tag.

     

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

     

     

    Let me know if you have any further questions.

    -lambert

  • 2009年6月18日 19:41dudeJoe 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Lambert,

    I used similar approach as you describe.
    When I look the HTML that gets rendered, there is the title tag containing my customized title text but in addition there is a second title tag visible.
    Any idea why this happens? It appears as if Sharepoint would render an additional title tag into the source. The master page as well as the page layouts I use do not have any markup.

    Thanks for any hint.

    Jo
  • 2009年10月2日 9:01Rik Helsen 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hey lambert, this is an issue we have encountered on ALL our sharepoint websites, As soon as you try and add custom text to the title tag in the masterpage (not pagelayout) a second blank title tag is generated at the bottom of the head element.

    This is a bug in sharepoint that i haven't found a work-around for so far...


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


    doesn't render "- companyname" at all in the cases i'm looking at now.

    HOWEVER,
    if you include the suffix/prefix for the title in a literal enclosure, then it does work:


    <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle  runat="server"></asp:ContentPlaceHolder><asp:Literal runat="server" id="Literal1"> - CompanyName</asp:Literal></Title>



  • 2009年11月17日 4:39Matt, creature of the day 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    When I try to use this method within a webpart, I get "Content controls have to be top-level controls in a content page..." I don't get this when I use it outside it (on a non-master page). I would like to be able to dynamically change the page's title using list data. How would this best be done?