Add custom part field in projector filters

Topics: Customizing Orchard, Writing modules
May 19, 2012 at 12:37 AM

Hello guys.

I'm building a webshop module. My productpartrecord and productpart have a relation to non-content CategoryRecord. Any ideas how can I add the CategoryRecord_Id to query filters so I can use a querystring to filter projector list?

Coordinator
May 19, 2012 at 12:43 AM

Go to the Bindings tab in Query, look for your record and select the property.

May 19, 2012 at 12:46 AM
Edited May 19, 2012 at 12:47 AM

It's not there!!

Have this in ProductPart

        public CategoryRecord CategoryRecord {
            get { return Record.CategoryRecord; }
            set { Record.CategoryRecord = value; }
        }

And this in ProductPartRecord

public virtual CategoryRecord CategoryRecord { getset; }
Coordinator
May 19, 2012 at 1:02 AM

Oh, it's a relationship. Then you will need to create your own custom filter. You can take a look at how it's done in Taxonomy, because there is the same problem.

May 19, 2012 at 1:03 AM

Ok. Thank you. I'll check this.