public function render($view, $data = array(), $return = array()) { $category = Y::category(); $params = array( 'block' => new BlockViewer($category), 'meta' => new MetaViewer($category), 'category' => $category ); $data = CMap::mergeArray($data, $params); //хранить только алиасы. в базовых классах вычислять саму категорию //ввести в контроллер параметр, по которому будет определяться делать render или renderPartial //например для popup // Y::dump($data['block']->left); parent::render($view, $data, $return); }
public function init() { parent::init(); $baseUrl = Yii::app()->baseUrl; $this->registrationUrl = $baseUrl."/registration"; $this->recoveryUrl = $baseUrl."/recovery"; $this->loginUrl = $baseUrl."/login"; $this->logoutUrl = $baseUrl."/logout"; $this->cabinetUrl = $baseUrl."/cabinet"; $this->profileUrl = $baseUrl."/profile"; $this->adminReturnUrl = $baseUrl."/admin"; $this->returnUrl = $baseUrl."/profile"; $this->returnLogoutUrl = $baseUrl."/login"; $this->editProfileUrl = $baseUrl."/profile/edit"; $this->changePassUrl = $baseUrl."/profile/changepassword"; $this->category = Y::category('index'); $this->setImport(array( 'users.models.*', 'users.components.*', 'users.components.widgets.*' )); }