cancel
Showing results for 
Search instead for 
Did you mean: 

Add target=“_blank” attribute in UI Listing Action Links

Add target=“_blank” attribute in UI Listing Action Links

In the UI component listing aciton column, I want to add new attribute target="_blank".

$item[$name]['edit'] = [
    'href' => $this->urlBuilder->getUrl($this->editUrl, ['page_id' => $item['page_id']]),
    'label' => __('Edit')
];


Is there any possility to add new attribute. I have tried to add but it was not showing in the rendered HTML.

 

Please help.

1 REPLY

Re: Add target=“_blank” attribute in UI Listing Action Links

Youn can open a link in a new browser's window by defining the "callback" parameter for an action: 

https://github.com/magento/magento2/blob/487f5f45/app/code/Magento/Ui/view/base/web/js/grid/columns/...

How is a row's «Actions» dropdown implemented on the backend CMS pages grid? https://mage2.pro/t/928