I am trying to retrieve the Children Keywords of another Keyword from its URI with the following code:
if (kwdOrCatURI.StartsWith("tcm:"))
{
if (kwdOrCatURI.EndsWith("-1024"))
{
rootkeyword = factory.GetTaxonomyKeyword(kwdOrCatURI);
taxonomychildren = GetKeywords(rootkeyword);
}
}
....
private static ArrayList GetKeywords(Keyword kwd)
{
ArrayList arraylist = new ArrayList();
if (kwd != null)
{
foreach (Keyword childkeyword in (IEnumerable)kwd.KeywordChildren)
{
arraylist.Add(childkeyword);
}
}
return arraylist;
}
Unfortunately, I am not able to get the children, since the list is always empty. However if I "iterate" & "browse" over the category I am able to get to all its children...
Anyone has an example on how to retrieve the children of a Keyword from its URI without having to iterate over the entire category?
Thanks!