Yii Framework Forum: renderpartial from renderpartial - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

renderpartial from renderpartial Rate Topic: -----

#1 User is offline   des1roer 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 10-February 15

Posted 20 February 2016 - 06:13 AM

how i can renderpartial from renderpartial ?
1 st

renderPartial('//../modules/analiz/views/analizCreate/shihta')

and from shihta

$this->renderPartial('_table'

SiteController не может найти представление "_table"
0

#2 User is offline   hrnair 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 214
  • Joined: 09-December 12

Posted 20 February 2016 - 09:32 AM

View Postdes1roer, on 20 February 2016 - 06:13 AM, said:

how i can renderpartial from renderpartial ?
1 st

renderPartial('//../modules/analiz/views/analizCreate/shihta')

and from shihta

$this->renderPartial('_table'

SiteController не может найти представление "_table"

When you do renderPartial using $this->renderPartial('_table'), in the '_table.php' view file use another renderPartial $this->renderPartial('_table1')
0

#3 User is offline   des1roer 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 19
  • Joined: 10-February 15

Posted 23 February 2016 - 11:27 PM

what?

from main page i have tree with ajaxlink


I first displays the first view for file \protected\modules\analiz\views\analizCreate\shihta.php

$content = $this->renderPartial('//../modules/analiz/views/analizCreate/shihta');


and in first view (shihta.php) I kind of laid

$this->renderPartial('_table',


and

AnalizCreateController controller can not find the idea "_table".


How do I specify the path to
\protected\modules\analiz\views\analizCreate\_table.php
?
0

#4 User is offline   Selvakumar 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 131
  • Joined: 14-August 13
  • Location:Bangalore, India

Posted 23 February 2016 - 11:55 PM

Try render file like this
Yii::app()->controller->renderFile(Yii::app()->basePath.'/<view-path>',$params);

OR
$this->renderPartial("/analiz/views/analizCreate/_form", array('data'=>$data));

OR
$this->renderPartial('application.modules.analiz.views.analizCreate._form', array('data'=>$data));

You have to identify as the tree folder like this: protected/modules/analiz/views/analizCreate/shihta

OR
$this->renderPartial("//analizCreate/_form"");

Quote

Absolute view within the application: the view name starts with double slashes '//'. In this case, the view will be searched for under the application's view path. This syntax has been available since version 1.1.3.

This can be seen in the documentation

Reference link
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users