Theme dependencies not forced to enable by default

Topics: Troubleshooting, Writing modules, Writing themes
Mar 15, 2011 at 2:28 AM


I just noticed that even when theme has dependencies, they are not forced to enable (if disabled). In the appropriate controller action (in Orchard.Themes) there is call to the _featureManager.EnableFeatures(<id list>, false). Enabling modules, on the other hand, correctly forces dependencies to enable. I don't understand why make a difference?


Mar 15, 2011 at 2:55 AM

Because that's a bug :)

Mar 15, 2011 at 3:44 AM

Oh, that explains everything:)

Sep 6, 2011 at 11:25 AM

I'm confused... I didn't think Themes could have dependencies in their manifest? 

Sep 6, 2011 at 12:43 PM

Basically yes, but why not?

That is achievable from code so there seems to be no real reason to not allow such behavior. Imagine you have a complex theme that relies on specific modules to make it work... Eg. mobile theme that relies on a third-party module that adds jQuery Mobile scripts.

Sep 6, 2011 at 1:13 PM

Ah - we're singing from the same songsheet then.  I have the same requirement.

In my case it's creating modules to extend support for additional jquery plugins (fancybox namely).  Easy enough to get the module to depend on the jQuery module but can't currently state in the theme manifest of fancybox enabled themes that they require the fancybox module.  It's a shame because it could have been used to prevent users from accidently picking a theme without first adding (and enabling) the required module.