This project is read-only.

Projection Filter by Custom Field

Topics: Writing modules
Feb 15, 2013 at 2:18 PM
Edited Feb 15, 2013 at 2:20 PM
I create custom field and would like to use it in prejection as filter.
My custom filed stores the values ​​in my custom table.

Can i give to projection a value from code (are not stored in Orchard_Framework_ContentItemVersionRecord)
Feb 15, 2013 at 2:58 PM
Edited Feb 15, 2013 at 2:58 PM
By Custom Field, are you referring to a content field, or a property on a record class?
Feb 15, 2013 at 3:07 PM
My field:
    public class RelationshipField : ContentField {

        internal LazyField<IEnumerable<ContentItem>> _contentItems = new LazyField<IEnumerable<ContentItem>>();

        public IEnumerable<ContentItem> ContentItems {
            get {
                return _contentItems.Value;
I fill _contentItems in RelationshipFieldHandler.
Feb 16, 2013 at 12:48 AM
I whould like to filter by MyField.ContentItems.Count() value