5

Using Tridion Core Service which method would provide me a whole object of below tree

Core service provinding me whole xml but not .net object of ProductCatalog.

3

The SDL Tridion Core Service will return you a IdentifiableObjectData object when you call the client.Read() method. You can cast this object into a CategoryData object which will just contain the information about this Category.

There is to my knowledge no way of getting a Category object which contains the entire tree of Keywords, from the Category you would have to call:

client.GetListXml(categoryUri, new KeywordsFilterData() { IsRoot = true });

And for each of the Keywords returned you can then call:

client.GetListXml(keywordUri, new ChildKeywordsFilterData());

To get each of its children. An example of this I have displayed in my Item Selector on SDL Tridion World.

3
  • I have read that Content Management Explorer(CME) is a web base client for CM and the read/write/update data which is saved in CM database. If this is a client which shows full hierarchy of taxonomy then how come core service doesn't provide any option. Doesn't CME also use core service at backend to show content to us? Jan 21 '14 at 18:31
  • Yes and yes. CoreService will give you a list of keywords in a given category, and will also indicate which of those keywords are "root" keywords (see Bart's example with IsRoot=true in the filter). The reason behind is that Keywords are not necessarily used as a hierarchy - they can be stored as one, but you may want to use it flat lists too. That, and the fact that originally they were flat lists only, hierarchy was added in Tridion 2009.
    – Nuno Linhares
    Jan 21 '14 at 21:49
  • @ChakreshSingh on top of what Nuno explained, the CME displays the Keywords with the calls I indicated. When you open a Category, you first get to see its root Keywords, then you have to open up those to see their children. There is no way of opening up the entire tree at once (and if there was that would use separate calls to build up). Jan 22 '14 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.