E
E
EVOSandru62015-08-28 06:23:40
Yii
EVOSandru6, 2015-08-28 06:23:40

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)

I'm getting an error:
OffersController cannot find view "application.extensions.widgets.views._offers.php".
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valery, 2015-09-03
@supervaleha

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 question

Ask a Question

731 491 924 answers to any question