I am trying to render view in new tab
this is what I have tried
$this->render('receipt', array(
'data' => $data
));
But I want to open this receipt view in new tab. Please some one help me
I am trying to render view in new tab
this is what I have tried
$this->render('receipt', array(
'data' => $data
));
But I want to open this receipt view in new tab. Please some one help me
Copyright © 2021 Jogjafile Inc.
If you mean a new browser tab, this question is not about yii at all. It's a html question. If you mean something different, update your question.
You can open a new browser tab to your
receiptcontroller/action with a anchor tag on your page and use the target attribute, for example:<a href="/order/receipt" target="_blank">View receipt</a>. Then a new browser tab wil open and yii will routeorder/receiptthe url to your controller and view that renders it.Also see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target