yii2


Open in a new window in yii2 [For a button dropdown]


how can one open a link in a new tab. in my case i wanna do it in the following code
if( Yii::$app->session->get('department_id') == 5 )
{
$items[] = ['label' => 'Offer Letter',
'url' => Yii::$app->urlManager->createUrl(['dashboard/print_offer_letter', 'id' => $data->id]),
];
i tried like this but didn't work
$items[] = ['label' => 'Offer Letter', ['title'=>'go','target'=>'_blank'],
'url' => Yii::$app->urlManager->createUrl(['dashboard/print_offer_letter', 'id' => $data->id]),
];
any help would be appreciated.
I think you can use something like below:
$items[] = [
'label' => 'items',
'url' => Yii::$app->urlManager->createUrl(['dashboard/print_offer_letter', 'id' => $data->id]),
'linkOptions' => ['target'=>'_blank']
];

Related Links

frontend login is not working properly in yii2
Yii Gridview show/hide columns from interface when filtering the records
Yii2 skip to other URL route if <controller>/<action> is not found
Include additional library to yii2
Yii2 make session works on all actions of one controller?
Yii2 display data from phpexcel in view before saving to database
yii2 dependant dropdown reset on edit action due to onchange function
Yii2 non-DB (or virtual) attribute isn't populated during massive assignment?
Yii2 Join multiple tables
Codeception Adding custom assert actions (functional testing)
Selected values in yii2
Yii queryBuilder; If dbexpression is not being quoted well
Time attribute validation in Yii2 framework
Yii2 kartik-datecontrol extension
SQL query help in Yii2
Yii2 Pjax inside ListView not working

Categories

HOME
java
google-chrome-extension
multithreading
proxy
fluentd
layout
onedrive
office365api
webstorm
rdf
datastax-java-driver
medical
reveal.js
modelica
windows-azure-storage
dynamics-crm-online
uitypeeditor
aurigma
contextmenu
django-cms
dbext
custom-wordpress-pages
sylius
pass-by-reference
format-specifiers
firebase-crash-reporting
cas
fluentvalidation
dbclient
siesta-swift
usbserial
commit
host
devextreme
main
event-driven
optix
glew
jsch
atomicity
worksheet
pnotify
tizen-native-app
togetherjs
colorama
imanage
dwscript
webdriverjs
yt-project
root-framework
time-and-attendance
google-feed-api
libpng
infix-notation
bonobo
url-masking
intrusion-detection
mikroc
websitepanel
holder.js
pickadate
nessus
design-by-contract
itextpdf
lib.web.mvc
collapse
qdialog
feedback
fouc
createprocessasuser
remobjects
e10s
jsapi
dia
rdtsc
java-metro-framework
onactivityresult
mesa
starcluster
funcunit
poller
jboss-weld
java.nio.file
back-stack
mqx
distutils
funscript
osql
spring-portlet-mvc
code-cleanup
blackberry-playbook
gamequery
icanhaz.js
nsviewanimation
compiler-specific
backcolor
sustainable-pace
django-notification

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App