Don't ask how I discovered this...

Take your cck (or views or all your modules) and copy them into a themes/example/modules directory.

Drupal will auto-discover them.

And "overlay" the "real" modules you already have.

But also show the modules in the themes list in the GUI.

And vice versa, for themes in the modules sub-sub directory.

Maybe there is a real Use Case for a themes/foo/modules/bar setup, but it sure eludes this naive reader...

And having TWO with the same name criss-crossing and populating both themes and modules is probably Not Right, even if there is a Use Case.

Maybe stuff in "themes" should be themes and the stuff in "modules" should be modules and never the twain shall meet would be a good rule, eh?

I'm just newbie enough to have managed to get stuck in this mess when somebody handed me a full Drupal dir called "new_theme" and I tossed into my themes dir. Oh. I wasn't going to admit to that. Oh well.

Comments

EvanDonovan’s picture

I agree with RichardLynch that it would make sense for the auto-discovery mechanism not to look for modules in the themes directory (and, possibly, conversely, not to look for themes in the modules directory). It's a difficult error to recover from if you copy files to the wrong place by mistake, since I think it requires directly editing the {system} table.

RichardLynch’s picture

If nothing else, if you've got a module named "foo" and find another one somewhere else named "foo" that probably indicates a problem that should not just blindly march forward...

bfroehle’s picture

Well, the current module/theme searching is essentially directory agnostic. Personally I think this is a good idea, as it leaves the door open for custom directory structures.