The content picker is an incredibly useful field in Orchard CMS. When it first came out, however, it did not filter on content types which led me to creating my own Content Picker in Orchard CMS With Content Type Filtering and Search. In the upcoming release of Orchard 1.7 we now have content type and part filtering built into the content picker which I will now show in this Orchard CMS Tutorial. Check out my other Orchard 1.7 Tutorials, including the new Shape Link for Orchard Menus and Content Type Layer Rule.
All Orchard Developers have been waiting for content type filtering for the content picker in Orchard CMS. There is nothing more frustrating than creating a cool Orchard widget or content type for a client that includes a content picker and have the administrator be inundated with content types that do not apply in the content picker selection. For example, let's say you create a cool slider widget for your Orchard website. The Slider widget contains a content picker allowing the administrator to choose one or more slides to display in the slider. Unfortunately, when the administrator goes to select the slides he has numerous content types thrown is his face, including pages, blog posts, projections, etc. With content type filtering the administrator now only sees content items of type Slide, making the process so much easier!
Choosing which content types to display in the content picker is simple. Let's say you have an Orchard E-Commerce Website with a Product Content Type and you add a content picker that allows the administrator to choose one or more product categories associated with the product. We'll filter the selection to only display those content items of type Category.
I won't show it in this Orchard tutorial, but you can also filter based on content parts. And, of course, you can filter on as many content types and content parts as you like by separating them with a comma.
Now when your client chooses categories for the Product in your Orchard online store he will only see a list of content items of type Category as opposed to products, blog posts, slides, and whatever other content types you have in your Orchard store.
After selection, the content picker for your Product in your Orchard e-commerce store will have the categories you selected, making the process so much more wonderful!
All Orchard Web Developers want this content type filtering in the content picker and now they have it in the upcoming Orchard CMS 1.7 or you can grab it from the latest Orchard Source Code. I'll be happy to stop using my custom content picker in Orchard, and I suspect I am not the only Orchard developer with their own version of the content picker :)
Other features in Orchard 1.7 include:
If you need an Orchard Theme, Module, Widget, or Website, I am an Orchard CMS Developer for hire.