We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Some Problem about the Assets Manager Usage.

Have Some question about the Assets Manager of Phalcon

My Code is Like this.

    namespace ....
    use Phalcon\Assets.....

    class......

    $this->assets->collection('someCss');
    ->addCss('css/some.min.css')
    ->assCss('css/some2.min.css')
    ->join(1)
    ->setTargetPath('path/to/public')
    ->setTargetUri('static/some.min.css');

But this code won't work If i use the Filter it's will combine the Css or Js but not link them to page.

    ->addFilter(new Phal....CssMin())

there will be some css or js files under the public folder,but in the page these static files are not included.

How am i suppose to correct it?

edited Jul '16

Hi,

$this->assets->collection('someCss');
    ->addCss('css/some.min.css')
    ->assCss('css/some2.min.css')
    ->setTargetPath('path/to/public/some.min.css')
    ->setTargetUri('static/some.min.css')
    ->join(true)
    ->addFilter(new \Phalcon\Assets\Filters\Cssmin());

Try to place name of file in TargetPath and check if all paths is correct (Uri & Path). After check if that files are generated in Target Path. After- check Uri path :) Good luck!