B
B
beta-it2016-10-28 19:41:04
css
beta-it, 2016-10-28 19:41:04

How in yii\bootstrap\Collapse - header formatting?

Actually, the question is how can you transfer HTML tags to the Label and content,
for example, the same div.row>div.col-sm-*?

<?= \yii\bootstrap\Collapse::widget([
                    'items' => [
                        [
                            'label' => 'LABEL TEXT',
                            'content' => 'CONTENT TEXT',
                            'contentOptions' => [
                                'class' => 'in'
                            ],
                            'options' => [],
                            //'encodeLabels' => false,
                        ],
                    ]
                ]); ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-10-28
@beta-it

echo Collapse::widget([
     'encodeLabels' => false,
    'items' => [
        [
            'label' => '<h3 class="col-xs-12">Collapsible Group Item #1</h3>',
            'content' => $this->render('_some_my_view_file'),
            'contentOptions' => ['class' => 'in']
        ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question