One of the first issues a developer runs into when dealing with ZF2 modules is how to arrange assets between modules. This presentation covers such issue.
More can be found on this blog post: http://www.mvassociati.it/en/gems/php/asset-management-zend-framework-2
3. Shared between modules
Like javascript libraries, logos, buttons,
CSS scripts and snippets, etc.
3
4. Shared between modules
Like javascript libraries, logos, buttons,
CSS scripts and snippets, etc.
Where should they be placed?
4
5. Shared between modules
Like javascript libraries, logos, buttons,
CSS scripts and snippets, etc.
Where should they be placed?
Inside project /public folder?
There is a better way…
5
6. Exclusive of a module
Like javascript libraries, images and
CSS files that are needed by a single
module only
6
7. Exclusive of a module
Like javascript libraries, images and
CSS files that are needed by a single
module only
Where should they be placed?
7
8. Exclusive of a module
Like javascript libraries, images and
CSS files that are needed by a single
module only
Where should they be placed?
Inside that module!
8
9. Possible approaches
• Copy & paste of each file inside project
/public folder?
• Use symlinks?
• Tune apache to "look" the files inside
each module?
9