YII How to convert a CHtml::link into a bootstrap.widgets.BootButton?

i came across a little quest i am trying to convert this link that i worte in YII into a yii.bootstrap button but with very little success. I looked for a solution in the documentation on the bootstrap page but with no results so iam hoping someone here will point me in the right direction.

so the code for the link is as follows :

<?php echo CHtml::link(










The code for the yiibotstrap button is as follows :

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



        'icon'=&gt;'ok white',


        // '', 'large', 'small' or 'mini'

)); ?>

By the way iam programming in YII (php framework)

I’m not sure, but have you tried something like :

<?php $this->widget('bootstrap.widgets.BootButton', array(


    'buttonType' => 'link',

    'url'=>array('#', 'Price[command]'=>'delete', 'Price[id]'=>$id, 'noValidate'=>true),


    'icon'=>'ok white',

)); ?>

But if your button is really a submit button, then it should be inside a form and automatically send the parameters from the form. Hope this helps…



Thanks for your reply your approach works i just tried it out but if anyone else is interested in the following way it also works <?php

$this->widget(‘bootstrap.widgets.BootButton’, array(












        )); ?&gt;

i have an even more challanging question how could i convert the following code into a bootstrap button :

$this->widget(‘Relation’, array(

            'model' =&gt; &#036;model,

            'relation' =&gt; 'products',

            'parentObjects' =&gt; Product::model()-&gt;findAll('id_contract='.&#036;model-&gt;id_contract),

            'fields' =&gt; 'product_name',

            'showAddButton' =&gt; false,