More in this section

Forums / Developing with Sitefinity / News Article URLs

News Article URLs

6 posts, 0 answered
  1. David
    David avatar
    26 posts
    Registered:
    12 Jul 2008
    14 Jan 2009
    Link to this post
    I have a news listing page called News.aspx and a news article page called NewsArticle.aspx. Each of my news articles then has a URL of:
    /News/NewsArticle/[NewsTitle]-[Date].aspx

    Is it possible to amend this so that the URL is:
    /News/[NewsTitle]-[Date].aspx

    It is part of some SEO work I am doing.

    Thanks
    Dave Cooper
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    16 Jan 2009
    Link to this post
    Hello David,

    Thank you for using our services.

    There are two ways to you can get this working:

    1. Using NewsView control in BehaviorMode set to "Auto" ( Advanced settings). In this way the articles will be generated on the same page.- let's call it News.aspx.

    2. Second way requires creating of a custom urlRewriter that will give you the desired result.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. David
    David avatar
    26 posts
    Registered:
    12 Jul 2008
    20 Jan 2009
    Link to this post
    Hi,

    Thank you for your reply but I don't think this is the solution I am looking for.

    1. I link to news articles from the homepage and from a news list page so the links to news articles on the home page would be different from the links to the news articles on the news list page. Is this right?

    2. I don't see how URL rewriting would solve this either because the website itself is producing the URLs. I can do URL rewriting so that the correct URL works from the outside but internally we are producing the wrong URL.

    Any thoughts?

    Thanks
    David
  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    20 Jan 2009
    Link to this post
    let me try and see if I understand what you've got here. It sounds like you are saying that you have a newslist on your homepage which has a short list of links to news items. Then you also have another page say /news.aspx which ALSO has a list of the same news items, except perhaps slightly expanded with maybe a summary... BOTH of these pages link to yet another page say /newsarticles.aspx which displays the full details for a single news item that comes from either the homepage or the news.aspx page. this means that whenever you link to a single news item you get /news/newsarticle/thenewsitem.aspx when what you want is news/thenewsitem.aspx

    do i have that right? I actually did this exact same thing with my blog, before it was /blog/post/posturl, and I changed it to be blog/posturl

    if this is what you're trying to do then what you need to do is change BOTH the news.aspx and the homepage so that it links to the NEWS.ASPX for news items, instead of the newsarticle.aspx. the news.aspx should have a NewsView control, and this control is capable of rendering as both the news list AND the single news item depending on the link that is served to it. which means the newsarticle.aspx page is not necessary.

    go into the newsview and edit the properties so that it is in List & Page mode, then go advanced tab and under Explicit Links make sure that both the news.aspx and homepage point to news.aspx for the singleItemurl. Also make sure that the newsview behavior is set to auto so that it can switch modes based on if it's showing a list or a single item.

    now by the way you should know however that this will change the structure of your site. I do'nt know if you had this but I had it as blog/default.aspx. in order for me to get it to the way I have it now, it had to become blog.aspx. which means if people are linking to blog/default.aspx, they will get a broken link, because the correct page is blog.aspx. there is a workaround for this which is to add a default.aspx page a subpage of your news.aspx and make it an exact copy of news.aspx (that is put a news view on it and link it to news.aspx), that way if anyone did link to your old news page as a subdirectory, they won't have any broken links...

    I hope that this information was made sense and was helpful (and correct!)
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Jan 2009
    Link to this post
    Hi David,

    Could you please follow up, if the solution from Josh works for you?
    Josh, as usual, thank you for attendance in our forums. We appreciate it!

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    23 Jan 2009
    Link to this post
    i think i know what you are after:

    we had to implement a similar solution on our site. we had lots and lots of news views throughout the site and to help with SEO we required that each article had the same URL no matter which news view it was being visited from. To implement this we added some extra meta-fields to the news module by adding them to the news edit and insert templates. these extra meta fields would be for things such as "department" and "product", so that articles couild be classified on a granular level.

    then we extended the news view control so that it would look at at the properties of each article and render it's URL based on these new meta-fields. so the url would be written as: www.website.com/news/[department]/[product]/[article_title] as opposed to www.website.com/[news_view_title]/[article_title]. because of having many news views, where articles could be displayed in more than one news view (there was overlap), we needed static-seeming urls to not dilute our link equity. by writing urls based on these pre-defined meta-fields the link is guaranteed to be the same WHEREVER you're navigating to it from - seeming as if their are static and not dynamically generated!

    hope that helps!
Register for webinar
6 posts, 0 answered