I have used the TaxonomyFactory
to get keywords:
var taxonomyUri = "tcm:304-4135-512";
var model = _taxonomyFactory.GetTaxonomyKeywords(taxonomyUri);
This gives me a response like:
{
"name": "Test Category",
"description": "",
"isUsedForIdentification": false,
"key": "",
"keywordMeta": {
"name": "custom-meta",
"children": {},
"nameValues": {}
},
"keywordChildren": [
{
"name": "Keyword A - Value",
"description": "Keyword A - Desc",
"isUsedForIdentification": false,
"key": "Keyword A - Key",
"keywordMeta": {
"name": "custom-meta",
"children": {},
"nameValues": {
"round_flag": {
"valueType": 1,
"name": "round_flag",
"value": "tcm:304-156971",
"firstValue": "tcm:304-156971",
"multipleValues": [
"tcm:304-156971"
]
},
"country_code": {
"valueType": 1,
"name": "country_code",
"value": "Keyword A - Country Code",
"firstValue": "Keyword A - Country Code",
"multipleValues": [
"Keyword A - Country Code"
]
},
"flag": {
"valueType": 1,
"name": "flag",
"value": "tcm:304-156880",
"firstValue": "tcm:304-156880",
"multipleValues": [
"tcm:304-156880"
]
},
"path": {
"valueType": 1,
"name": "path",
"value": "Keyword A - Url Path",
"firstValue": "Keyword A - Url Path",
"multipleValues": [
"Keyword A - Url Path"
]
}
}
},
"keywordChildren": []
}
]
}
within the keywordMeta
there is a list of nameValues
containing other tcm ids, e.g. tcm:304-156971 = tcm:304-156971
which I know is an image.
How do I then use this id tcm:304-156971, to get that Component? I have tried to use the ModelServiceProvider.GetEntityModelData
but it requires a template ID which I won't know.