HTML title for news items

Posted by Community Admin on 03-Aug-2018 19:03

HTML title for news items

All Replies

Posted by Community Admin on 16-Mar-2011 00:00

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.

Posted by Community Admin on 17-Mar-2011 00:00

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

Posted by Community Admin on 09-May-2011 00:00

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!

This thread is closed