Hi,
I would like to include a js file inside my module('modules/emp/assets') and published it at
protected/components/Controller.php.
While registering the js in the view its throwing error.
Error as "The asset "" to be published does not exist. "
I would like to include a js file inside my module('modules/emp/assets') and published it at
protected/components/Controller.php.
private $_assetsBase; public function getAssetsBase() { if ($this->_assetsBase === null) { $this->_assetsBase = Yii::app()->assetManager->publish( Yii::getPathOfAlias('application.assets'), false, -1, YII_DEBUG ); } return $this->_assetsBase; }
While registering the js in the view its throwing error.
Yii::app()->clientScript->registerCssFile(Yii::app()->controller->assetsBase.'/js/jquery.js') echo Yii::app()->controller->assetsBase;
Error as "The asset "" to be published does not exist. "