php - yii2 transfering navbar widget parametres to single html parametres -
i going make yii2 popup window feedback form , followed programmers tutorial. in tutorial programmer gave these parametres navbar in main.php
echo nav::widget([ 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => [ ['label' => 'home', 'url' => ['/site/index']], ['label' => 'about', 'url' => ['/site/about']], **['label' => 'contact', 'url' => '#', 'options' => ['data-toggle' => 'modal', 'data-target' => '#mymodal']]**,
the programmer gave these parametres inside nav widget in contact label,
'options' => ['data-toggle' => 'modal', 'data-target' => '#mymodal']
however, must use -->['data-toggle' => 'modal', 'data-target' => '#mymodal']<-- parametres in here :::
<a href="#" class="btn"><?=yii::t('common', 'participate'); ?></a>,
but dont know how give these values <a> tag or here <?=yii::t('common', 'participate'); ?>,
should , there solution?
wouldn't use:
<a href="#" class="btn" data-toggle="modal" data-target="#mymodal"><?=yii::t('common', 'participate'); ?></a>
Comments
Post a Comment