Yii引导程序,将id和类添加到TbBootstrap


Yii bootstrap, adding id and class to TbBootstrap

我使用的是PHP Yii框架,遇到了一个关于向选项卡添加Id和其他属性的问题

$tabs = array(
        'item1' => array(
            'label' => 'label1',
            'content' => $content1,
        ),
        'preview' => array(
            'label' => 'Preview',
        ),
    );
$this->widget('bootstrap.widgets.TbWizard', 
     array(
        'id' => 'harvest-tabs',
        'type' => 'tabs',
        'tabs' => $tabs,
        'pagerContent' => false,
    ));

如何将"id"answers"class"属性分别添加到选项卡"item1"answers"preview"中?我试过了:

'item1' => array(
                'label' => 'label1',
                'content' => $content1,
                'id' => 'some id'
                'class' => 'some class'
            ),
            'preview' => array(
                'label' => 'Preview',
                'id' => 'some other id'
                'class' => 'some other class'
            ),

但这并没有给它添加类。我只看到<li>'s用作标签的容器。对不起,我是这里的新手。我很感激任何帮助谢谢!

你应该试试这个:

'item1' => array(
    'label' => 'label1',
    'content' => $content1,
    'htmlOptions'=>array(
        'id' => 'some id'
        'class' => 'some class'
    ),
),

我还没有尝试过,但我在这里遵循yii引导逻辑。如果它不起作用,请告诉我。