Winter CMS resources and help articles

Simple and to the point. Optimized by the community.

Replace all columns for an existing List Controller

0
by mjauvin, last modified on March 28th, 2023
YourListController::extend(function ($controller) {
    if (!$controller->listConfig) {
        $controller->addDynamicProperty('listConfig', 'config_list.yaml');
    }
    $controller->listConfig = $controller->mergeConfig($controller->listConfig, [
        'list' => '$/myAuthor/myPlugin/config/new_columns.yaml'
    ]);
});

Discussion

0 comments

We use cookies to measure the performance of this website. Do you want to accept these cookies?