How To Load Images From Asset Manager?

Need some explanation about asset manager.

   The background images are loaded in css file.



	background:url(../images/top_bg.jpg) repeat-x right;

	padding: 6px 0px;


  After that the css file is loaded by asset manager like this.

	$file3 = dirname(__FILE__).DIRECTORY_SEPARATOR.'/../css/main.css';

        $url3 = Yii::app()->getAssetManager()->publish($file3);


 But the images are loaded.

 "Failed to load the given url" shows as an error.

How to solve this...

Nedd some help form Yii enthusiasts..

You can register the CSS file directly with registerCssFile with assetmanager.

can you please elaborate by some example.

i.e.there is no need to depend on asset,or publish assset,you can register css file with code like this,


from which you have to include css.

For referance of register css & js,refer link

forum post

By doing like that the css file is not loading. But i will try my level best.