[MAGNOLIA-6450] Multiple magnolia.resources.dir directories Created: 30/Nov/15 Updated: 19/May/22 Resolved: 19/May/22 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | templating |
| Affects Version/s: | 5.4.3 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Stefan Lotties | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Date of First Response: |
| Description |
|
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. |
| Comments |
| Comment by Roman Kovařík [ 19/May/22 ] |
|
Hello, This ticket is now marked as closed due to one of the following reasons:
If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you. Thank you, |