-
Improvement
-
Resolution: Won't Do
-
Neutral
-
None
-
5.4.3
-
None
We usually separate modules based on their domain, e.g. one for all basic templates, one for the theme, one for the newsletter, one for providing an API to access some third-party-system and so on. Therefore resources may be located in more than a single resources directory.
I wondered why Magnolia just allows to specify a single magnolia.resources.dir as it's very interruptive to switch the directory whenever I change a module that contains templates. That's why I implemented a ResourceOrigin provider to allow multiple resource directories. The code is appended. Hopefully the code or the idea is of some use.
btw, it's a hell to write tests for this as long as all the default ResourceOrigin implementations are final.
Acceptance criteria