orchardcms-1.10

Custom content part not showing in sort criteria on query


I'm quite new to Orchard and are building a new contentpart to use on my site. I have followed this guide http://docs.orchardproject.net/en/latest/Documentation/Writing-a-content-part/ when building it. The content part work fine but when I try to use it in a query the members of my new content part doesn't show up under Edit Query/Sort Criteria. So my question is: Is this by design or am I missing something? I have searched the net and debuged orchard but been unable to figure out what decides which fields/parts that are shown in the query sort criteria definition.


Solution

  • You have to bind the properties of your content-part. You can do that inside the Queries Management.

    There is a tab called "Bindings" which leads you to the "Manage Bindings" Section and there you can create a new Binding to your Content-Part and the Members / Properties of your part. After you set up the new Binding you can Select the Property inside your Query.