+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Linking News Archive Control and News Display

Linking News Archive Control and News Display

8 posts, 0 answered
  1. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    25 Jan 2011
    Link to this post
    Hi All,

    I've been working with the news module, and we've structured two categories under the news section: feature news, and archives. The client has migrated all of their news to the site, and populated 5 articles under the feature news category, and the remainder into the archives.

    I have a news archive page with the archival control on it, and it is accurately reflecting the contents of all the news articles (irrespective of category). Is there a way to limit the archival control to a particular category? 

    Second (and more serious issue) is that the archival control links the 5 from the feature news properly to the news display on the same page (posts back to itself), but when you select any of the months in the archival control nothing displays in the news control. What am I doing wrong in terms of the configuration here that would be filtering out the links from the archival control? 

    Thanks in advance.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    25 Jan 2011
    Link to this post
    Hello Neil,

    The NewsArchive and all archive controls have a property - FilterExpression that you can use to filter the content by Category

    Category = "test"

    Kind regards,
    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
  3. Neil
    Neil avatar
    30 posts
    Registered:
    20 Jan 2009
    25 Jan 2011
    Link to this post
    thanks Ivan. I've set category = "archive" as the only filter expression on both the archive control and the news display. On initial load of the page the news listing shows all, but when I select a month from the archive control (which does have the archiveurl set to the current page name) no news articles are displayed?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    01 Feb 2011
    Link to this post
    Hi Neil,

    This FilterExpression is valid only for the ContentArchive. It will populate its datasource based on the category you enter. The archive control will show only dates for which you have news items in a given category.
    Note that this control caches, so the application should be restarted,otherwise you might see invalid results.
    What the ContentArchive does is passing a QueryString with parameters of the date which NewsView and all other ContentView controls uses to filter the datasource. If your NewsView control is not on the same page you should set ArchivePageUrl property. This will tell the ContentArchive control how to build the NavigateUrl of the RadTreeNode used in ContentArchive

    Kind regards,
    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
  5. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    02 May 2011
    Link to this post
    I think my issue is related so i am continuing this thread.

    I have a NewsView that is filtered by the following filter because we only want it to show unexpired articles:
    Publication_Date <= "#now" AND Expiration_Date > "#now"

    I have an unfiltered NewsArchive that lists the years and months of all news articles. Clicking on a month will redirect back to the NewsView with a URL like the following:
    News-Room.aspx?Year=2008&Month=1

    The problem is that the articles that don't pass the filter criteria for the NewsView page are not displayed. What is the best way to go about fixing this?

    Is there a way to ignore the NewsView filter when query parameters are present? I thought about using an "archived" category but would rather not to have to manually transition all expired news articles to that category.

    I'm open to suggestions and examples would be great!
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    03 May 2011
    Link to this post
    Hi ,

    There is a way to ignore the filter, but you should create a custom control that inherits from NewsView and override its CreateChildControls method and clear the filtering before calling the base or create a custom filter. You should crate an instance of ContentFilterBuilder and call filterBuilder.RemoveFilter() method.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Karthika
    Karthika avatar
    1 posts
    Registered:
    05 May 2014
    04 Dec 2014
    Link to this post

    Hi Ivan,

    I'm using 7.0.5 version, and I too have the same issue with News Archive widget. where Archive widget is not restricted to a particular category.

    I'm trying to find the 'FilterExpression' property in Advanced mode but i'm not finding it in Advanced setting.

    Please let me know where can i find that.

  8. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    22 Sep 2016
    08 Dec 2014
    Link to this post
    Hello Karthika,

    You do not need to filter the items in the Archive widget, but in the Content (in that case News) widget.

    Thus only the Items with the selected category will by displayed for the period selected in the Archive widget. 

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
Register for webinar
8 posts, 0 answered