Custom Filter that selects all content items whose content type have certain content parts attached

Topics: Writing modules
Jul 12, 2012 at 10:44 PM
Edited Jul 12, 2012 at 10:44 PM

I'm looking to create a Query with a filter that selects all content items whose content type consist of certain content parts.

For this, I am writing a custom filter and custom form from which the user can select the content parts to filter on (it's basically a copy of the ContentTypesFilter with a few tweaks).

However, I can't figure out how to create  the required query using the current API unless I open up the DefaultHqlQuery class so I can add Joins and Wheres myself to include the ContentTypePartDefinition table in the query. Unless, of course, I'm overlooking something.

Any sample code, tips, pointers or hints would be greatly appreciated.


Nov 20, 2012 at 3:10 PM

I'm trying todo the same and facing the same problem. Have you already found a solution?

Dec 17, 2012 at 6:29 PM

I haven't looked into it since, so right now I am only able to query content items by a single content part.