More in this section
Forums / Sitefinity SDK / FIlter Blog Post by Category

FIlter Blog Post by Category

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Tristan
    Tristan avatar
    1 posts
    Registered:
    19 Feb 2014
    19 Feb 2015
    Link to this post
    I've run into an issue where I need to filter a list of blog posts by pre-determined categories. I can get a list of all of the blog posts and I can get a list of all of the available categories, but I cannot tell which blog posts belongs in any specific category. I've search this forum and google for sample codes to help me get started but have not gotten any closer to a solution. Does any one have any tips on how to accomplish this?
  2. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    24 Feb 2015
    Link to this post
    Hi,

    Once you have the categories, you can build the query as described here:http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/get-related-news-items-from-tags#mhv_SHCUf0OqnwehOodZ1g. You just need to make sure that all category ids are include in order to get only the items that have them assigned.

    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
2 posts, 0 answered