Closed roman-kyrii closed 10 years ago
As explain in the README (https://github.com/neilime/zf2-assets-bundle#2-assets), you can define assets configuration by module.
Exemple :
Structure
- modules
--- Application
------ assets
---------- css
---------- js
------ config
--------- module.config.php
------ src
You module.config.php can contains this following config
return array(
//...
'asset_bundle' => array(
//...
'assets' => array(
'Application' => array(
'js' => array(__DIR__.'/../assets/js'),
'css' => array(__DIR__.'/../assets/css')
)
)
)
//...
)
Thank you very much for reply! You helped a lot. "DIR" made things work. Pardon my inattention.
I'm happy that this module helps you, thank you fo your feedback
Hello
Is it possible to define per module configuration in way that AssetsBundle would take assets from module specific folder and cache them in
public/cache
. For example let's say moduleApplication
hasassets
folder withcss
,js
,img
,fonts
folders in it. How should one configure 'zf2-assets-bundle' to make it take assets from thisassets
folder. I thought it is possible by configuringApplication/config/module.config.php
withbut it isn't working this way.
Is this module can provide this functionality? Or assets from all modules should be placed in one folder which is pointed by
'assetsPath'
configuration option?