Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6450

Multiple magnolia.resources.dir directories

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • None
    • 5.4.3
    • templating
    • 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

              Unassigned Unassigned
              slotties Stefan Lotties
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD