We have a category called ProductType with keywords to denote each type and we have a metadata schema called Product Group Metadata associated for each keyword. This metadata schema has three fields. 2 text fields and 1 drop down field.
I've tried using the following:
var keywordMeta = keyword.KeywordMeta;
if (keywordMeta != null)
{
var metaNameDictionary = keywordMeta.NameValues;
var metaNameEnumerator = metaNameDictionary.GetEnumerator();
while (metaNameEnumerator.MoveNext())
{
var currentMetaDe = (DictionaryEntry)metaNameEnumerator.Current;
var currentMeta = (NameValuePair)currentMetaDe.Value;
if (currentMeta != null)
{
// Process each metadata field.
}
}
}
Unfortunately, the keyword.KeywordMeta returns 0 despite having a metadata associated with the keyword and the loop is skipped.
Any ideas?