Yii::app()->module will return current module, so if U are asking for myvariable it should be in module class not it’s controller, but Yii::app()->controller will return current controller, I’m not sure what an how are U trying to do but this shuld return your variable if view belongs to this controller