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

Forums / Developing with Sitefinity / Sorting taxonomies

Sorting taxonomies

2 posts, 0 answered
  1. Erik Jan
    Erik Jan avatar
    1 posts
    Registered:
    10 Apr 2012
    27 Nov 2012
    Link to this post
    Hi,

    Some time ago we managed to create a custom TaxonomyControl. It's bound by Taxonomy-Guid to Sitefinity in order to get the required items.
    _tax is a dictionary with key: Taxonomy-Guid and value: stringarray with name / title. 


    TaxonomyControl t = new TaxonomyControl()
    {
    ContentId = Guid.Parse("00000000-0000-0000-0000-000000000000"),
    Enabled = true,
    EnableViewState = true,
    FieldName = kp.Value[1],
    ID = "CC_" + _tax.Keys.ToList().IndexOf(kp.Key),
    RenderAs = TaxonomyControl.RenderTaxonomyAs.VerticalList,
    SeeAllTextFormat = "All ({0}) {1}",
    ShowItemCount = true,
    TabIndex = 0,
    TaxaCount = 0,
    TaxonomyId = kp.Key,
    Title = kp.Value[0],
    ViewStateMode = ViewStateMode.Enabled,
    Visible = true
    };

    This works, but now we want the taxa in alphabetical order, and not ordered by ordinal value of the Taxonomy table. There is no property in TaxonomyControl to order them in any other way. How can I make this possible?

    Kind regards,

    Erik Jan
  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    30 Nov 2012
    Link to this post
    Hello Erik,

    This request has been logged to our PITS, where you can track its progress and vote to increase its popularity. 

    All the best,
    Pavel Benov
    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
2 posts, 0 answered