This project is read-only.

Several Modules in one project

Topics: Customizing Orchard
Jun 2, 2013 at 6:11 PM
dear all,
i would like to structure my modules like orchard.core,
it means that 1 folder/area will contain 1 module.
is there any way to achieve that?

Jun 3, 2013 at 8:06 AM
One folder under /Modules is already one module. You'll have to be more specific about what you're trying to do here.
Jun 3, 2013 at 10:35 AM
okay, let me rephrase it.

in Orchard.Core, we have several folder which represent a module like Common, Title, etc.
Each of these folder has their own controller , view , etc.

but with /modules, we have the controllers directly under the project.
Is it possible for one project to have several modules, separated by folder ?
If yes, how do i achieve that?

Jun 3, 2013 at 10:53 AM
I'm quite sure that modules should each have their own folder directly under Modules so no, you can't have more modules in the same folder and manage them as a whole like with Core. This doesn't prevent you to have multiple modules (multiple project files) under one, separate solution if you wish.

Also do you know that modules can have multiple features? Maybe this would be sufficient for your needs? You can also structure your module in an arbitrary way (e.g. having folder for features like YourModule/YourFeature/Controllers), physical location doesn't matter for auto-discovered types like controllers (just derive them from Controller or IController). The only thing to keep in mind here is that you should place your record classes under the YourModule.Models/Records namespace but still they can be in any subfolder.