Poser une questionPoser une question
 

TraitéeSEO in SharePoint

  • lundi 14 juillet 2008 16:22SteinerTCU Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

     

    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.

     

Réponses

  • mercredi 16 juillet 2008 03:58Lambert QinMSFT, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    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

Toutes les réponses

  • lundi 14 juillet 2008 17:27Robert Stark Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

     

    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.
  • lundi 14 juillet 2008 18:15SteinerTCU Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

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

  • mercredi 16 juillet 2008 03:58Lambert QinMSFT, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée

    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

  • jeudi 18 juin 2009 19:41dudeJoe Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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
  • vendredi 2 octobre 2009 09:01Rik Helsen Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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>



  • mardi 17 novembre 2009 04:39Matt, creature of the day Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    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?