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

output of active view depends on the type of user
How to set-up different URLs for yii frontend and backend
Ecommerce/Classified template with Yii2
Yii2 field accessed only via magic method
How to add a css class to <td> tags in a kv- GridView class in Yii2
Capcha always show incorrect
Integration Reportico in Yii2 Projects
Yii2 : Subdirectory in yii2 not working
Yii2 KCFinder with CKEditor
Yii2 - validation compare acting strange
Updating composer throws exception Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
Dynamic declaration of a model in Yii2
image are save in folder but not saved in database in yii2.0
how can i put sidebar menu in right side using yii2
Yii2 afterSave. Using changedAttributes show error
how to do a nested foreach loop in yii2?

Categories

HOME
log4j
bluetooth
hook
keycloak
ngrx
fft
google-oauth
paw-app
amazon-ecs
google-project-tango
windows-server
fingerprint
datastax-java-driver
in-app-purchase
bs4
facebook-php-sdk
spring-tool-suite
percona
try-catch
django-simple-history
normalizr
viewport
swiftlint
kryo
xlsxwriter
functional-testing
css-animations
buildbot
user-interaction
web-api-testing
maquette
typo3-6.2.x
wtx
preg-match
usbserial
textmate
azure-sql-database
ghost4j
main
event-driven
sqlite2
elasticsearch-plugin
texmaker
modelmapper
sencha-touch-2.3
flickr-api
fault
python-c-api
boost-multi-index
powercli
yii2-extension
composite-key
feeds
dtexec
qtwebview
akka-cluster
watchconnectivity
time-and-attendance
firmata
rotativa
mathematica-frontend
contact-list
freedesktop.org
wso2cloud
metaclass
angular-leaflet-directive
embedded-code
0xdbe
tableau-online
sailfish-os
skos
dd
nsbutton
device-manager
bitcoinj
htmlcleaner
spring-io
cos
batterylevel
yui-compressor
xamlparseexception
dmoz
sublist
cisco-jtapi
dice
manchester-syntax
cascalog
javaspaces
bigcouch
nsobject
file-comparison
mozilla-prism
modelstate
microsoft-virtualization
sustainable-pace
noscript
sector
msdev
mdac
document-conversion

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