0

我有一个自定义部分“功能”这是模型

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

但是,过滤器的选项列表中仅显示归档值。如何将自定义零件数据公开给过滤器选项值?

4

1 回答 1

1

您可以通过投影下的绑定选项卡添加新属性以与投影一起使用。

于 2012-11-02T16:41:18.333 回答