Approach to Module for a scenario

Topics: Customizing Orchard, General, Writing modules
Aug 9, 2012 at 6:43 AM

Hi I'm very new to Orchard and have read through definitions and some pretty great examples.


I am trying to work out how best to structure a scenario in Orchard.. as a module or something else:


We would like to have a section in the admin area where a user can select a ContentPart (from a list of dropdowns on the like). in doing so they can then upload an excel spreadsheet. The result of that upload would be the content part then has a list of content parts auto generated as associated child items underneath. We'll then have a page for each of the parent content parts which creates a listing of the child parts in paginated form.


i.e. we have a Library Content Part and the user uploads an excel spreadsheet containing book information with info like isbn, youtube video link to author etc and in accessing the library content part you see the list of it's books..


It would be nice if we didn't have a whole pile of individual content parts/types thrown in to the system for each book rather just by clicking on the library item you could see each book then go in and edit.. 


Open to any/all suggestions of how to approach this if the module is just the importer or the module is more..


I'm just not sure how to approach it in a hierachical and automated way..



Aug 9, 2012 at 5:13 PM

Everything you described could be done as a single module: it will contain controllers, views, drivers, application services, admin menus, etc. Think of your module as a regular MVC Area. To have your views blend in into the admin UI, name your controller AdminController (or decorate your controller with the [Admin] attribute. To integrate with the admin menu, implement INavigationProvider.

Aug 9, 2012 at 11:06 PM

Thanks so much! will get moduling and see how I go! just getting the page laid out in different layouts on a per page basis is something im not enjoying about orchard.. it feels like there's alot of overhead rather than just keeping it simple by being able to apply a view to a given page.. all this xml generation etc just seems overkill

Aug 10, 2012 at 5:42 AM

Sorry just wondering if we have a content part called library how would i take a collection of all libraries and display them in a drop down?



Aug 10, 2012 at 5:48 AM

ContentManager has querying APIs that you can use for that.

Aug 10, 2012 at 6:00 AM

any examples you could give me? Sorry im finding it really tricky to get documentation on this stuff.


like things like understanding what an orchardswitch attribute is.. or just in general certain approaches

Aug 10, 2012 at 6:07 AM

There are dozens of examples throughout the code. Make a search for IContentManager usage.

Aug 10, 2012 at 6:19 AM

On Fri, Aug 10, 2012 at 4:07 PM, bertrandleroy <> wrote:

From: bertrandleroy

There are dozens of examples throughout the code. Make a search for IContentManager usage.

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at