How To Add A Span Tag For A Content In The In Yii Bootstrap.widgets.tbbuttongroup

Can any one Suggest me how to add a span tag for a content in the in yii bootstrap.widgets.TbButtonGroup

<?php $this->widget(‘bootstrap.widgets.TbButtonGroup’, array(

   'type'=&gt;'danger', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'

   'htmlOptions'=&gt;array('class'=&gt;'danger checkout-id'),





	   // here i want to add &quot;Fareed&quot; and want to apply a span tag



           array('label'=&gt;'Action', 'url'=&gt;'#'),

           array('label'=&gt;'Another action', 'url'=&gt;'#'),

           array('label'=&gt;'Something else', 'url'=&gt;'#'),

           array('label'=&gt;'Separate link', 'url'=&gt;'#'),



)); ?>

at the comment place i want to add the code in the above program.

Hi Mohammed,

Can’t you use CSS3, with before and content? See W3 School

Hence, you can add a CSS element:

$this->widget('bootstrap.widgets.TbButtonGroup', array(

'type'=>'danger', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'

'id' => 'buttonGroup',

'htmlOptions'=>array('class'=>'danger checkout-id'),


and in your css might be something like (not tested):

#buttonGroup:first-child:before{ content: "Fareed";}

Two other options:

  • using the brand tag of navbar?

  • add a menu item (in front of the button group) without an active link?

Don’t know whether this solves your problem, but I hope it might help!