![](/img/trans.png)
[英]Get class with custom attribute where customproperty has certain value
[英]Get CustomProperty value of taxonomy
我為Customonomy分配了Custom屬性。我需要通過與Ektron Framework Api一起使用,通過傳遞Taxonomy ID來獲取自定義屬性值。
我在Ektron 9工作。
提前致謝!
您可以使用CustomPropertyObject
類檢索分類法自定義屬性。 我使用類似於以下代碼:
var customApi = new CustomPropertyObject();
var customPropertyId = 0; // Put here your custom property id
var taxonomyId = 0; // Put here your taxonomy Id
var customProperties = customApi.GetItem(taxonomyId, 2057 /* language code */,
EkEnumeration.CustomPropertyObjectType.TaxonomyNode, customPropertyId)
.Items.ToDictionary(i => i.PropertyId, i => i.PropertyValue.ToString());
您只需要輸入自己的TaxonomyId
, CustomPropertyID
和語言代碼。
希望這會有所幫助,喬納坦
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.