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

How to use bower installed widget in yii2
Yii2: Error In Composer
How to pass model to Listview in yii2
Is there better code generation for Yii2 other than Gii
Yii2: Registering javascript when loading (nested) Gridview through renderAjax
Yii2 set active user in API
Yii2 full calendar AjaxEvents not working properly
white color Issue after create thumbnail image in yii2
Creating a one-to-many relationship in Yii2
Handle Image update in yii2
Header and Footer missing in modal popup
Select2 Krajee widget - using modal and getting the id of the value
sjaakp/yii2-illustrated-behavior Yii2 extension for image not working
change the navigation bar url from yii2 without redirecting
Yii 2 - Conditional Assets?
How to get value of dropdown instead of id yii2

Categories

HOME
urbancode
deezer
angular-material
json.net
mean-stack
android-4.4-kitkat
jxls
yum
append
python-unittest
nano-server
nstableview
postgres-xl
correlation
orchardcms
msp430
try-catch
netflix
google-cloud-speech
lucene.net
nodatime
plunker
conemu
mps
facebook-instant-articles
realex-payments-api
lcd
buildbot
internet-explorer-9
brunch
tooltipster
entitlements
applozic
neo4j-spatial
r-raster
xquery-3.0
caret
windows-dev-center
lto
gesture
sql-server-agent
dynamic-reports
powershell-dsc
fakeiteasy
skeleton-css-boilerplate
upstart
lowpass-filter
elgg
google-perftools
sqlbulkcopy
python-cryptography
mediaelement
quartz-composer
topbeat
pintos
angular-cache
removechild
vmware-tools
elements
trash
paypal-express
packagist
pickadate
bluemix-app-scan
php-internals
ipconfig
wapiti
system.management
freelancer.com-api
icu4j
cannon.js
ruby-2.2
iis-arr
wyam
ionic
operation
facebook-graph-api-v2.4
knuth
starcluster
mysql-error-1062
concurrent-collections
c18
aqtime
xamlparseexception
dmoz
isnullorempty
bluepill
runas
bigcouch
transactionscope
adk
php-parser
gcj
floating
w3wp.exe
fluent-interface
digest-authentication
paster
modelstate
procedural-music
port-number
paul-graham
misv

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