Varun Kumar
Varun Kumar

Reputation: 322

Ektron CMS asp.net : How to get list of child taxonomies under parent taxonomy recursively

I'm working on Ektron CMS asp.net web forms(not mvc).

I want to get list of child taxonomies under parent taxonomy recursively.

Could anyone help me on this.

Upvotes: 0

Views: 42

Answers (1)

user0474975
user0474975

Reputation: 149

This should work:

using Ektron.Cms.Framework.Organization;
using Ektron.Cms.Organization;
using System.Collections.Generic;

Code:

long parentID = 2147486197; // This is the parent taxonomy's ID

TaxonomyManager taxMan = new TaxonomyManager();
TaxonomyCriteria criteria = new TaxonomyCriteria();
criteria.AddFilter(TaxonomyProperty.ParentId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, parentID);
List<Ektron.Cms.TaxonomyData> resultsList = taxMan.GetList(criteria);

Upvotes: 0

Related Questions