Answer the question
In order to leave comments, you need to log in
How to make $this->controller->render('application....') from a widget in yii?
Good afternoon.
Widgets are in the extensions folder (protected/extentions/widgets)
I'm trying to pick up a piece (protected/extentions/widgets/views/_offers.php)
From the file protected/extentions/widgets/views/bid.php
Thus:
$this->controller->render('application.extensions.widgets.views._offers.php', ['model'=>$item], false, true)
Answer the question
In order to leave comments, you need to log in
The question is a little unclear.
If you want to draw a view of the widget from a widget, you can get by with simply specifying the path in render (i.e. without aliases).
Otherwise - as you can see from the error - the bug is on the way. Alternatively, try simplifying the path - for example, by replacing "application.extensions" with "ext".
As a last resort, check the correctness of the path obtained from the alias using getPathOfAlias
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question