This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi there, I want to have full control on the rendered display for $this->listRender() I searched in the code and found out that it was in backend\widgets\lists\partials, the file named _list_body_row.htm.
So I copied it on my plugin's controller folder, same name, modified it, and nothing happened. I also tried to put it in subfolders like suggested in the forum (list subfolder) , or even "playing" with the plugin controller, as stated here : https://octobercms.com/support/article/ob-20, but I'm not sure it's related to the view, cause I got this error message :
List behavior has not been initialized, check that you have called makeLists() in your controller.
I'm lost, how can I change this list view ?
Thanks
Thank you for your fast answer!
I tried the trick, but nothing happened :
use Backend\Behaviors\ListController;
class Plugin extends PluginBase
{
public function registerComponents()
{
}
public function registerSettings()
{
}
public function boot()
{
ListController::extend(function($controller) {
list($author, $plugin) = explode('\\', strtolower(get_class()));
$partials_path = sprintf('$/%s/%s/partials/lists', $author, $plugin);
$controller->addViewPath($partials_path);
});
}
}
1-4 of 4