Try Now
More in this section

Forums / General Discussions / NewsView - ListPageDetails.ascx - All News link

NewsView - ListPageDetails.ascx - All News link

2 posts, 0 answered
  1. Ivan
    Ivan avatar
    51 posts
    22 Aug 2007
    22 Jun 2010
    Link to this post

    I am using a NewsView control to display a list of news items on a press.aspx page.  I have it configured so that the individual news items open in another page (article.aspx) using the NewsView control again.  I am having a problem with the "All News" back link.  Is there a way to configure the "All News" back link?  I would expect that it would link back to press.aspx page that calls it but it is referring back to itself, article.aspx.

    Am I missing a configuration someplace?

    Thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    25 Oct 2016
    22 Jun 2010
    Link to this post
    Hello Ivan,

    If you have a page especially prepared to hold the full info and the NewsView control on this page is set to use Details mode you should event not see the "All news" back button. The control you have dropped on the destination page uses Auto mode and this is why you see the link. the property SingleItemUrl is supposed to show an item in single mode only which means that the control should be configured to use Details mode.

    There is  way that you can expose a custom property which alters the back link depending on your page. The easiest way is mapping the external template for details mode - ListPageDetail.ascx and hardcoding the back link. The better option is creating a custom control that inherits from NewsView and then overriding CreateSingleContent() from where you could access the back url. Basically you could hide the default button and your custom HyperLink where you set NavigateUrl property. You will be able to access your custom link from SingleContainer of the template.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered