I am trying to add an additional filter option to the list of Contents (admin/contents/list) in Orchard. I started by replicating the existing filter by Content Types, and have gotten to the point that I am able to display my new filter list, populate it, etc.
In the AdminController for Contents there is an ActionResult Method called List which is called both on initial load, as well as after post (via a redirect) which seems to be where the query is built. Looking at the existing filter for Content Types I see this:
query = query.ForType(model.TypeName);
What I am a little confused on here is how to extend this example to query by the locale (Culture) of a Content Item. Would it make sense to use the .ForPart method? Though I need to be careful here since in the default view I want to show only "en" - but I also want to display any items without the LocalizationPart (as opposed to when I am actually filtering by a specific Culture - and then do not want to show items with no LocalizationPart)
I have read through the following, but none of these seem to address my exact scenario (unless I am reading one wrong)..
- How to filter related Content Parts within a Orchard CMS Query
- Sorting and filtering lists in Orchard
- Filter by Content Type in Orchard CMS
- Numerous others....
If anyone could provide me pointers on where to look it would be most appreciated.