Publishing assets from modules in Zend Framework 2

喜欢而已 提交于 2019-12-03 21:14:12
Richard Holloway

This has been discussed before in many places and it comes down to three ways to manage this.

  1. Copy and Paste the assets into the public/ directory

  2. Use symlinks

  3. Use an asset loading module like assetic

A simple solution would be to make the copying of assets part of you build process.

Another question was already asked How to merge Zend Framework 2 module public directories for info.

I know this is pretty old, but I wanted to add this information for other readers.

Now there's also a module for this, which has been fully tested and is being used (and even depended on) by many modules.

Check it out here: https://github.com/RWOverdijk/AssetManager

Hope this helps.

There is also fourth option. Use a directory Alias in VirtualHost configuration.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!