Reputation: 11
I'm currently working on a site that uses TaxonomyManager to grab a set of items in a category and display them as a list of links within our site.
We noticed that there were some records not being included in the list, despite being part of the category. Upon stepping through our code, I noticed that when the data was passed through GetTree(), the item count went from 84 to 80.
I've tried searching around online, but nothing regarding GetTree() losing or truncating data could be found.
TaxonomyData taxonomyData = new TaxonomyData();
Dictionary<string, TaxonomyItemData> taxonomyFullData = new Dictionary<string,TaxonomyItemData>();
List<TaxonomyItemData> taxonomyFullDataList = new List<TaxonomyItemData>();
Ektron.Cms.API.Content.Taxonomy taxonomyApi = new Ektron.Cms.API.Content.Taxonomy();
TaxonomyManager txMan = new TaxonomyManager();
TaxonomyBaseData[] taxBaseData = taxonomyApi.ReadAllAssignedCategory(longContentId);
foreach(TaxonomyBaseData myTaxData in taxBaseData ){
PagingInfo pageInfo = new PagingInfo();
pageInfo.CurrentPage = 1;
pageInfo.RecordsPerPage = myTaxData.ItemCount;
taxonomyData = txMan.GetTree(myTaxData.Id, 5, true, pageInfo);
taxonomyFullData = getTaxonomyData(taxonomyData, taxonomyFullData);
}
Upvotes: 0
Views: 42
Reputation: 765
I have done Ektron some time ago. But in one of the configs (in the new version there are more, can't remember the names), you can set the list limits (Defualt = 50).
In your API you can also do it over PageingInfo like this:
PagingInfo pageInfo = new PagingInfo(100);
Or when you just want all:
PagingInfo pageInfo = new PagingInfo(int.MaxValue);
Upvotes: 0