Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Partial Render View from Module to main directory

$
0
0
Problem 1
I want to renderPartial a view from modules. Actual directory structure is protected/modules/staff/views/myplacedeals/create.php is the file that needs to be rendered in protected/views/places/view.php The problem is that i get exception if I put

$this->renderPartial(YiiBase::getPathOfAlias('staff').'/views/myplacedeals/create.php',array())

or

$this->renderPartial(YiiBase::getPathOfAlias('staff').'/views/myplacedeals/create',array())


or

$this->renderPartial('staff/views/myplacedeals/create',array())


or
$this->renderPartial('/staff/views/myplacedeals/create',array())

of
$this->renderPartial('//staff/views/myplacedeals/create',array())


nothing from above works.

I get
CException : PlacesController cannot find the requested view

in CHAT
Rawatz and Ciss helped but i was not able to make it work.

Problem 2
with this i also have a confusion that when it comes to renderPartial's first argument it says that works like getViewFile. Now conditions for view file returning is
http://www.yiiframework.com/doc/api/1.1/CController#getViewFile-detail

Question is what ever you give in first parameter getViewFile would search for given view in following order

absolute view within a module if fails next
absolute view within the application if fails next
aliased view if fails next
relative view
?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>