c# - Orchard CMS: adding filter to Contents/List -


i trying add additional filter option list of contents (admin/contents/list) in orchard. started replicating existing filter content types, , have gotten point able display new filter list, populate it, etc.

in admincontroller contents there actionresult method called list called both on initial load, after post (via redirect) seems query built. looking @ existing filter content types see this:

query = query.fortype(model.typename); 

what little confused on here how extend example query locale (culture) of content item. make sense use .forpart method? though need careful here since in default view want show "en" - want display items without localizationpart (as opposed when filtering specific culture - , not want show items no localizationpart)

i have read through following, none of these seem address exact scenario (unless reading 1 wrong)..

if provide me pointers on appreciated.

you can add query = query.where<localizationpart, localizationpartrecord>(x => x.culture == "en") in case culture specified, , not call in other cases.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -