Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the keywords inside the category?

How to get the keywors inside the particular category using coreservice?

I am looking into the CategoryData class, but i dont see any methods or properties related to Keyword

like image 597
user1428019 Avatar asked Aug 22 '12 11:08

user1428019


1 Answers

Getting the Keywords inside a Category is similar to getting the Components inside a Folder. So you will have to call GetListXml with the category as the subject.

var filter = new OrganizationalItemItemsFilterData();
var category = "tcm:1-2-512";
var keywords = client.GetListXml(category, filter);
foreach (var keywordElement in keywords.Descendants())
{
    ...
}



Some background: the Core Service is a service-oriented API, so none of the ...Data objects have any methods to load additional information. Instead all data access goes through the CoreServiceClient, which then returns data objects that contain... data.

For those with a Java background, these might be more familiar as DAO/DTO, Data Access Object and Data Transfer Object: the CoreServiceClient is the DAO, the ...Data objects are the DTOs.

like image 53
Frank van Puffelen Avatar answered Oct 02 '22 08:10

Frank van Puffelen