[SOLVED] renderPartial inside base controller of module

I’ve a base controller AdminController in my module which is inherited by other controllers. It consist a set of helpful methods which are rendering content of some clips. I’m using inside this method renderPartial and I faced some problems. When I’m using 1st declaration (see code below) of render partial and when this method is called from controller inheriting from AdminController (e.g. AdminNewsController) this method tries to search ‘_catagoryNav’ in folder views/news (what is totally correct).

What I’m trying to achieve is to pass into RenderParial such path which will start to search ‘_categoryNav’ in /views/admin/. I tried to do this using 2nd declaration (see code below). What I got is an error message: “NewsController cannot find the requested view “W:(…)\protected\modules\admin\views\admin\_categoryNav”.”

       public function renderCategoryNavClip()



         //$items=CategoryItem::model()->findAllByAttributes('category_id','category_id = :cat_id',array(':cat_id'=>$this->category));


          //(1st) declaration of renderPartial

           $this->renderPartial( '_categoryNav',array('category'=>$category,'items'=>$items));  

          //(2nd) declaration of renderPartial

           $this->renderPartial( $this->getModule()->getViewPath().'\admin\_categoryNav',array('category'=>$category,'items'=>$items)); //(2nd)




Any idea how I can achieve my goal?

It not should be like this?


Thx, I tried this several times before… but failed. I tried now again (after your suggestion)… and it starts to work… probably I did some stupid typo? Thx a lot again :)