More in this section

Forums / General Discussions / HTML title for news items

HTML title for news items

3 posts, 0 answered
  1. Chris Joyce
    Chris Joyce avatar
    7 posts
    19 Sep 2008
    16 Mar 2011
    Link to this post
    We're using the news widget and upon doing some SEO optimization, the report said our titles for news articles were being duplicated.  So I investigated and it doesn't appear that the title of the article becomes the page title.  Is this true and is there way to configure the HTML page title when creating new articles?

    Thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    17 Mar 2011
    Link to this post
    Hi Chris,

    There is a way to do this. You should crate a custom class that inherits from PageRouteHandler. There you have to override SetPageDirectives. After the base you can call

    handler.Title and set the page title. You can get the current url from the HttpContext.Current.Request.

    All the best,
    Ivan Dimitrov
    the Telerik team
  3. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    09 May 2011
    Link to this post
    I just posted a blog that offers a possible alternative to creating a custom class: Running Server-Side Code in Sitefinity Widget Templates

    This shows you how to retrieve the details item and assign the title to the page in the details view using Server-Side code in your widget template. It uses the Events module for the example but this could easily be modified for news or any other content module that uses a widget template.

    I hope this is helpful!
3 posts, 0 answered