HTML title for news items
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.
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
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!