Raghuraman
(Raghuraman439)
#1
Need some explanation about asset manager.
The background images are loaded in css file.
.top_bg
{
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);
$cs->registerCssFile($url3);
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..
zishanj
(Jashsoftpk)
#2
You can register the CSS file directly with registerCssFile with assetmanager.
Raghuraman
(Raghuraman439)
#3
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,
Yii::app()->getClientScript()->registerCssFile(YOUR_Path)
from which you have to include css.
For referance of register css & js,refer link
forum post
Raghuraman
(Raghuraman439)
#5
By doing like that the css file is not loading. But i will try my level best.