コンテンツを追加するときにユーザーが選択できるリストオプションを持つカスタムテーブルがいくつかあります。特定のフィールドのオプションにアクセスできるようにするAPIには、フィルタリングウィジェットで同じオプションを使用できるものがありますか? Kenticoのカスタムテーブル内のフィールドのアクセスリストオプション10
次のようなものがありますが、それはカスタムテーブルのフィールドで機能しますか?
var guids = ParentDocument.GetValue("CustomFieldName").Split(';');
var referencedDocs = DocumentHelper.GetDocuments().WhereIn("DocumentGuid", guids);
UPDATE - 答えの変更でリンクする場合のコード:
protected string[] GetFormFieldOptions()
{
DataClassInfo dci = DataClassInfoProvider.GetDataClassInfo("custom.MyPageTypeName");
if (dci != null)
{
//Get the data from the form field
FormInfo fi = new FormInfo(dci.ClassFormDefinition);
FormFieldInfo ffi = fi.GetFormField("Industry");
string[] industries = ffi.Settings["Options"].ToString().Split('\n');
return industries;
}
return null;
}
そのコードは私が必要としたものでした!ありがとうございました! –