cancel
Showing results for 
Search instead for 
Did you mean: 

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

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

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 1

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