我有一个自定义部分“功能”这是模型
public class FeatureRecord : ContentPartRecord
{
public virtual bool IsFeatured { get; set; }
public virtual string Text { get; set; }
}
public class FeaturePart : ContentPart<FeatureRecord>
{
[Display(Name = "Is featured")]
public bool IsFeatured
{
get { return Record.IsFeatured; }
set { Record.IsFeatured = value; }
}
[StringLength(400)]
[Display(Name = "Feature Text")]
public string FeatureText
{
get { return Record.Text; }
set { Record.Text = value; }
}
}
我想为投影小部件设置查询,过滤器偏向于 IsFeatured 值为 true
但是,过滤器的选项列表中仅显示归档值。如何将自定义零件数据公开给过滤器选项值?