This project is read-only.

ExtensionManager - ExtensionFolders and ExtensionLoaders

Topics: Troubleshooting, Writing modules, Writing themes
Mar 18, 2011 at 10:14 AM

Like Orchard.Core there are multiple modules merged into one module. This is possible for Orchard.Core for the Extension folders since the OrchardStarter register in CreateHostContainer a ModuleFolder as IExtensionFolder with path ~/Core and ~/Modules. Also for the ThemeFolder ~/Themes.

I would like to add a path to the ModuleFolders like ~/Modules/MyCoreModule/
Also i thought that each module could include a theme but since the theme.txt isn't searched for, not included in _path. i think i need to add paths like ~/Modules/MyModuleWithMixedFunctionalityIncludingThemes/

A quick and dirty way is just to alter the OrchardStarter class and add a path to that array, but i don't want to alter Orchard code specific for our situation.

The ExtensionManager works with extensionfolders and extensionLoaders.

Is there a recommended way to add a ExtensionFolder / ExtensionLoader?

Mar 18, 2011 at 8:23 PM

What are the reasons to do this that are not covered by having multiple features in a module, and by dependencies between modules?

Mar 19, 2011 at 5:19 PM

2 reasons

1) placing a theme.txt inside a module in the module folder doesn't seem to work
2) having a own "Core" module the way Orchard.Core is.. seperate folders in them each containing a own module.txt 

The 1st reason is because a module providing features and themes doesn't seem to work, the theme.txt isn't being parsed. Only placing the module in ~/Themes does let the theme.txt be parsed.
For the 2nd reason we could just use one single module.txt with multiple features, but will there be limitations then?

Mar 19, 2011 at 6:25 PM

1. It never will, but having code in a theme works.

2. Right, and you can make a big module with several features inside. I don't know of any limitations with that.

You might also be interested in the new module recipe feature in 1.1 that will enable a module to provide a way to install other modules and themes.