Задайте вопросЗадайте вопрос
 

ОтвеченоSEO in SharePoint

  • 14 июля 2008 г. 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.

     

Ответы

  • 16 июля 2008 г. 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

Все ответы

  • 14 июля 2008 г. 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.
  • 14 июля 2008 г. 18:15SteinerTCU Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

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

  • 16 июля 2008 г. 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

  • 18 июня 2009 г. 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
  • 2 октября 2009 г. 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>



  • 17 ноября 2009 г. 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?