Reputation: 1035
This is a CButtonColumn configuration in a Yii grid:
array(
'class' => 'CButtonColumn',
'template' => '<div class="actions-box">{edit}{views}{print}{print_contract}{print1}{addendum}</div>',
'buttons' => array(
'addendum' => array(
'label' => '<i class="fa fa-print" style="color:grey"></i>',
'options' => array(
'title' => 'Addendum',
'target' => '_blank',
),
'url' => '"http://www.google.com"',
),
),
),
When clicking the "Addendum" button, it should navigate to Google. Now it opens in a new tab, but it does not go to Google. When I inspect the element, I get this output
<a title="<i class="fa fa-print" style="color:grey"></i>" href="#"><i class="fa fa-print" style="color:grey"></i></a>
Please help.
Thanks
Upvotes: 1
Views: 17
Reputation: 2971
Looking at the relevant documentation for button detail...
Label is a 'text label' for the button. It's injected into the 'title' attribute. That will generally show when you hover the button.
So you can only use text in that value, not html as you have above.
Upvotes: 0