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

Forums / Developing with Sitefinity / How to filter News without any classifications?

How to filter News without any classifications?

4 posts, 1 answered
  1. Osman
    Osman avatar
    22 posts
    Registered:
    04 Oct 2010
    06 Jun 2013
    Link to this post
    hi,

    I am looking into the ways to update the News widget's advanced settings for the FilterExpression field.

    I need to display the news entries without any Tags assigned, or another widget to display News entries without any categories assigned.

    I understand FilterExpression could have something like this to filter News by a certain tag:
    Tags.Contains("{4EEA167D-71D0-4332-9057-D550E2738076}") AND Visible = true AND Status = Live

    See http://www.sitefinity.com/developer-network/forums/permalink/lvHGE0fJikSqDMjFRW1M-A

    What expression filters un-tagged or un-categorized posts?

    Thanks,

    Osman 
  2. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    11 Jun 2013
    Link to this post
    Hi Osman,

    Thank you for contacting us.

    You can modify the filter expression to use Tags.Count =0 this way you will get the items that have not tags for example, like so: Visible = true AND Status = Live AND Tags.Count = 0 the same will work for categories. You can find some additional filter expression samples here:Filter Expressions for Sitefinity Content Items

    Regards,
    Atanas Valchev
    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 Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Osman
    Osman avatar
    22 posts
    Registered:
    04 Oct 2010
    12 Jun 2013 in reply to Atanas Valchev
    Link to this post
    Thank you Atanas.

    It works like a charm. And thanks for the extra bonus for the link for the additional filter expression samples. Great help!

    I would love to see an official repository for the tips like this, API documentation for the existing features, etc.
    IMO, the documentation microsite is good but not really enough.

    Cheers,
    Osman


  4. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    17 Jun 2013
    Link to this post
    Hello,

     Thank you for your feedback. The team is hard at work improving the documentation portal with more samples and real world example, so all feedback is welcome and greatly appreciated.

    Regards,
    Atanas Valchev
    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 Public Issue Tracking system and vote to affect the priority of the items
4 posts, 1 answered