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

checkboxlist not rendering checkbox checked correctly
Differentiate between Frontend and Backend Logs in DBTarget Yii2
yii2 ActiveData Provider
How to use custom php function to filter in ActiveDataProvider
Yii2 sort object defaultOrder
How to display names instead of id's in GridView Yii2?
yii2 / Migration Not Working
Kartik GridView Yii2 : Toggle data not working in toolbar
yii2 http client request and repsponse
How to insert multiple times the value of an attribute in single table in yii2
yii2 SluggableBehavior is applied to only emty slug field
Yii2: Create path and url for folder inside a module
Disable ActiveForm Clientside Validation on button other than submit Yii2
CRUD view link does not work in Yii2
Yii2 DynamicForm: Demo 3: Nested Dynamic Form with types of rooms
Company Follow Button disappear after login popup - Linkedin issue

Categories

HOME
java
osgi
wso2
azure-data-factory
push-notification
path-finding
smarty
electron
mean-stack
umd
pivotal-cloud-foundry
ios-charts
bs4
applepay
elasticsearch-hadoop
volttron
spring-xd
moonmail
fallback
iron-router
django-admin
pythonanywhere
jqwidget
predix
paging
xlsxwriter
opencover
opennlp
sparse-matrix
su
msys2
objectanimator
madlib
galsim
ioio
catel
typed.js
avcapturesession
plsql-psp
io-redirection
adobe-premiere
jquery-bootgrid
hockeyapp
user-controls
elmah
janrain
thin
dotcover
pubmed
blogengine.net
darcs
carrot
pearson
arrow-keys
gcsfuse
redundancy
wdf
multi-level
xml-attribute
qcustomplot
qgraphicsview
packagist
captivenetwork
revolution-r
hsv
kendonumerictextbox
spim
citrus-pay
purge
riak-cs
event-bubbling
createprocessasuser
unity3d-gui
dereference
umbraco6
google-style-guide
internet-connection
has-many-through
typeof
tld
poller
didselectrowatindexpath
plasma
sabredav
eventlistener
robotics-studio
simba
uiviewanimation-curve
enter
netdna-api
fireworks
php-parser
external-accessory
locationlistener
appender
sql-server-profiler
html-input
paster
revisions
filtered-index
microsoft-virtualization
ubuntu-9.04
signal-handling

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