Hi All,
What is the best place to put the widget class files ? And where to place its views ?
Regards,
Usman.
Hi All,
What is the best place to put the widget class files ? And where to place its views ?
Regards,
Usman.
You can put it into components/MyWidget.php.
You can put the view file(s) under components/views/myWidget.
In the widget class file, you can write then:
public function run()
{
$this->render('myWidget');
}
Regards,
Joachim