Add custom part field in projector filters

Topics: Customizing Orchard, Writing modules
May 18, 2012 at 11:37 PM

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?

May 18, 2012 at 11:43 PM

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

May 18, 2012 at 11:46 PM
Edited May 18, 2012 at 11:47 PM

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; }
May 19, 2012 at 12: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 12:03 AM

Ok. Thank you. I'll check this.