Relation recordUrl open in new tab
1
If you want the recordUrl to open in a new tab you can do the following:
-
Add this code to your Controller
public function relationExtendViewWidget($widget, $field, $model) { $partials_path = '$/author/plugin/partials/list/'; $widget->addViewPath($partials_path); }
-
Copy
modules/backend/widgets/lists/partials/_list_body_row.htm
to yourauthor/plugin/partials/list
folder and modify to your taste. -
Make sure to add an onClick() event on the 'a' tag
<a <?= $this->getRecordOnClick($record) ?> href="<?= $url ?>" onClick="window.open(this.href)"> <?= $this->getColumnValue($record, $column) ?> </a>
There are no comments yet
Be the first one to comment