More in this section

Forums / Developing with Sitefinity / NewsView Control not updating when page name is changed

NewsView Control not updating when page name is changed

2 posts, 0 answered
  1. michael
    michael avatar
    20 posts
    09 Jan 2009
    07 Mar 2009
    Link to this post

    I am facing a challenge with certain controls when i change  the name of my pages.  This is easiest to explain in the context of the NewsView control.

    I have a page that is called 'LastestNews'.aspx
    It has a child page called 'NewsItem.aspx'.aspx

    I added the news view to the LastestNews page and set the advanced property:
      Explicit Links => Single Item Url => ~/Media/LastestNews/NewsItem.aspx

    I then added a couple news items and voila the news items show up and when I click on them I get redirected to the appropriate page and I can read the uploaded article.

    However, I realize that a spelling mistake in the page name and go into the page properties and change the page name from 'LastestNews' to 'LatestNews'.  I then browse to my page and all my links in the NewsView control are broken.  The only way that I can fix them is to go into the NewsView advanced property and correct the url.  
        Old Version "~/Media/LastestNews/NewsItem.aspx
        New Version "~/Media/LatestNews/NewsItem.aspx

    I'm wondering if I've done something wrong, or is this how the control is intended to work and if I change page names then I have to go through my site and manually update all the controls that reference that page?

    It seems odd to me that the control keeps a static reference to the page instead of a dynamic reference.  I gather that each page has its own GUID that is used internally to identify pages.  Why is this GUID not stored by the control and then a URL rewriter service used to resolve the URL of the referenced page.  That way you can change page properties (or even page locations) and not worry about what controls is referencing that page.

    Anyone have comments?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    07 Mar 2009
    Link to this post
    Hi michael,

    You are right about the static url. It is not updated when you change the page name. Thank you for your idea. I updated your Telerik points.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered