I am currently looking at refactoring the code that I have spread throughout a heavily modified theme and custom module. I wondered if I can do this:

<root>
  /modules/mymodule

  ../mymodule/theme/mytheme

 

Such that the theme is available to the themeing system as usual, but was in this customised location of /theme/mytheme?

I looked at the hook_theme documentation but it's a little opaque ;-)

Comments

Unfortunately the word" theme" is used in different ways.  By "theme" do you mean the equivalent of Basis, Bartik, etc? (appearance themes). BTW, hook_theme has nothing to do with those appearance themes. It just defines theming functions or templates for things like item lists, tables, pages, forms, etc. 

So, if you are asking if you can put an appearance custom theme outside the ~/theme folder, and into a different folder... I don't know. Have you tried it?  

Yes, I mean something similar to Seven/Bartik/etc , but in another location. And yes, I've tried it, and it's not found. So I figured that there may have been a hook to load it or load it's resources (TPLs/JS/CSS/pre-processors).

The aim is to move the truck load of logic and handling out of the TPLs that are currently doing the job but aren't supposed to, but also to make the theme more agnostic, so it can be contributed and not require all of the module.

Have you tried adding a symlink pointing at the new location, within the ROOT/themes folder?