Take the 2-minute tour ×

I'm using Ektron CMS version 8.5 SP2.

I have some items in a taxonomy. Some are actual pages, some are library items (documents like Word files and PDFs).

Let's say there are 3 pages and 2 library items for a total of 5 items in my taxonomy.

I use the following code...

ContentManager cManager = new Ektron.Cms.Framework.Content.ContentManager();
Ektron.Cms.Content.ContentTaxonomyCriteria ctCriteria = new    Ektron.Cms.Content.ContentTaxonomyCriteria();
ctCriteria.AddFilter(1707, true); // hard coded taxonomy ID
List<ContentData> list = cManager.GetList(ctCriteria);
Label1.Text = list.Count.ToString();

When this code runs, the count of items in the list is 3. If I output the actual list, I can see it's only the pages in the taxonomy, not the 2 library items.

It seems that the ContentManager.getList() function does not get library items, even when those items have been added to the taxonomy. I can confirm that in the admin workarea, the library items are visible in the taxonomy.

For clarification, this is a problem with retrieving items that have already been added to the taxonomy.

Does anyone know how I can retirieve a list of all items in a taxonomy, including any library items in there.

Note: If I add the files to the Document Managment System instead of the library, it works perfectly. But in the live system, I have hundreds of items in the library and I'm hoping theres' a way to view them via a taxonomy without having to move them all into the DMS.

I have posted this question on the Ektron developers forum as well, but I've had no reply. I'm hoping somebody here can help.


share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

A follow up to my comment from the other day on @nedlud's answer, I felt like this deserved its own answer though.

According to the Framework API docs:

If intent is to retrieve CMS items that have been categorized in Taxonomies, use TaxonomyItemManager.

But as already noted in the comments, the TaxonomyItemData objects returned by this API have a number of empty properties such as QuickLink and Html. I've found that using the TaxonomyManager, one can successfully query for items assigned to particular taxonomy categories.

Here's a brief snippet using the Framework API (version >= 8.5); this feels reminiscent of working with the older (version <= 8.0) taxonomy API wherein one would create a TaxonomyRequest and get an object structure back that encapsulated not only the taxonomy iteself, but the items categorized into that taxonomy:

//e.g. for a single-level taxonomy

long taxRoot = 1707; //from OP's question
TaxonomyManager taxManager = new TaxonomyManager();
//GetTree overload supplying includeItems parameter
TaxonomyData taxTree = taxManager.GetTree(taxRoot, includeItems: true);

foreach(TaxonomyItemData taxItem in taxTree.TaxonomyItems)
    //these should print true

I'm currently refactoring some version 8.0 code into version 8.6 and converting to the Framework API. Until Ektron fixes the (bug?) of TaxonomyItemManager returning TaxonomyItemData with null properties, I'll be using the above method + LINQ for the sorting/filtering/etc.

share|improve this answer
Looks like I over looked this answer when it was first posted. Seems like it might resolve my most recent issue ( stackoverflow.com/questions/20184540/…) –  nedlud Nov 25 '13 at 4:17
I now have the problem that the "depth" parameter on the GetTree() call does not seem to be respected. Only returns the first level of items regardless of the value of "depth". –  nedlud Nov 25 '13 at 4:32
add comment

Thanks to @maddoxej suggestion of using the TaxonomyItemManager, I have working solution code...

TaxonomyItemCriteria criteria = new TaxonomyItemCriteria();
criteria.AddFilter(TaxonomyItemProperty.TaxonomyId, CriteriaFilterOperator.EqualTo, 1707);
TaxonomyItemManager taxonomyItemManager = new TaxonomyItemManager();
List<TaxonomyItemData> taxonomyItemList = taxonomyItemManager.GetList(criteria);
Label1.Text = taxonomyItemList.Count.ToString();

This code now shows the expected count of "5", and I can display all the itmes :)

So many "manager" classes in Ektron.

share|improve this answer
The problem I now face is that the "QuickLink" property of the library items is null, so while I can display the names of the items, I can't link to them :( –  nedlud Sep 17 '12 at 23:41
I'm facing the same issue with using the TaxonomyItemManager trying to retrieve all items assigned to a particular taxonomy category. I successfully get back the full list of items, but the QuickLink and more importantly Html properties are empty. Have you made any progress? –  kaveman Dec 5 '12 at 19:59
add comment

I would look at the TaxonomyItemManager rather than the ContentManager.

share|improve this answer
Thanks for that. Exactly what I needed. I've posted the working code in case it help anyone else. Cheers. –  nedlud Sep 13 '12 at 23:24
add comment

Your Answer


