Asset Manager in modules

Hi,

I have a question for the Asset Manager: I would like the resources (JS, CSS, etc.) take a modular basis. How and where can I notify the asset manager that the resources should be loaded from the respective module? And what is about the routing? => e.g. app / modules / module / assets / css / styles.css

Greetings Mario



82.2k

Hi, you can define the "assets" service in the module definition isolating the assets by module:

http://docs.phalconphp.com/en/latest/reference/applications.html#multi-module https://github.com/phalcon/mvc/blob/master/multiple/apps/backend/Module.php#L25

You can set a different base uri for static resources per module: http://docs.phalconphp.com/en/latest/reference/url.html#static-vs-dynamic-uris