Try Now
More in this section

Forums / Developing with Sitefinity / Urls and Classifications

Urls and Classifications

3 posts, 0 answered
  1. David
    David avatar
    114 posts
    19 Jul 2012
    05 Sep 2015
    Link to this post

    I have created two simple classifications, can I create a url that will filter on both classifications?  Or do I have to make a hierarchical classification in order to get this behaviour?


  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    21 Oct 2016
    09 Sep 2015
    Link to this post

    You cannot filter by multiple classifications in the URL. You can however, achieve this using our API.

    You can find below a sample that filters News items based on 2 custom classifications (Custom tags and Geographic regions):

    using System;
    using System.Linq;
    using Telerik.OpenAccess;
    using Telerik.Sitefinity.GenericContent.Model;
    using Telerik.Sitefinity.Model;
    using Telerik.Sitefinity.Modules.News;
    var newsManager = NewsManager.GetManager();
    Guid customTagId = Guid.Parse("bb474327-016d-6bce-b4b3-ff0000fe52e7");
    Guid geographicRegionId = Guid.Parse("d34c4327-016d-6bce-b4b3-ff0000fe52e7");
    var newsItems = newsManager.GetNewsItems()
        .Where(n =>
                && n.Status == ContentLifecycleStatus.Live
                && n.GetValue<TrackedList<Guid>>("customtags").Contains(customTagId)
                && n.GetValue<TrackedList<Guid>>("geographicregions").Contains(geographicRegionId)

    Velizar Bishurov
    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
  3. David
    David avatar
    114 posts
    19 Jul 2012
    09 Sep 2015
    Link to this post

    Thanks Velizar,


    It's not quite a nice from an SEO perspective.  Where /property-to-rent/London/2-bed would work better.  But I guess the only way to achieve this would be to have a hierarchical classifications.  Where for each place, you would have a sub-category of 1-beds, 2-beds, etc.?

3 posts, 0 answered