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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With