Vipin Semwal Posted August 14, 2012 Share Posted August 14, 2012 I want to renderPartial a view from modules. Path of View thats need to renderPartial: protected/modules/shop/views/products/addToCart.php Path where to be Rendered: protected/views/site/_post.php. Link to comment Share on other sites More sharing options...
Larry Posted August 15, 2012 Share Posted August 15, 2012 what about renderPartial('shop.views.products.addToCart')? 1 Link to comment Share on other sites More sharing options...
Vipin Semwal Posted August 16, 2012 Author Share Posted August 16, 2012 Sir this is not working. Link to comment Share on other sites More sharing options...
shibly27 Posted August 18, 2012 Share Posted August 18, 2012 You need to do this: 1. Load the module (main.php): 'modules'=>array( 'shop',) 2. autoloading model and component classes of the modules: 'application.modules.shop.models.*', 'application.modules.shop.components.*', 3. You will need to pass the model and others necessary data to the view (if required): $mymodel = new NewModel; $data['someData'] = 'Data'; echo $this->renderPartial('shop.views.products.addToCart', array('model'=>$mymodel,'data'=>$data)); I have same issue and I soled in this way in my application and its working. 2 Link to comment Share on other sites More sharing options...
Larry Posted August 20, 2012 Share Posted August 20, 2012 Thanks for helping Shibly! Link to comment Share on other sites More sharing options...
Vipin Semwal Posted August 22, 2012 Author Share Posted August 22, 2012 Thanks shibly this is working.... Link to comment Share on other sites More sharing options...
Recommended Posts