B
B
beefront172017-08-12 13:19:57
Yii
beefront17, 2017-08-12 13:19:57

Header text, Yii2?

Good afternoon!
Can you please tell me how to add text to the logo in Yii2?
There is a code

NavBar::begin([
    'brandLabel' => Html::img('/images/logo.png', ['alt' => Yii::$app->name]),
    'brandUrl' => Yii::$app->homeUrl,
    'options' => [
        'class' => 'navbar-inverse',
    ],
]);

I can not understand. You need to insert text right next to the picture.
I will be grateful)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2017-08-12
@slo_nik

Good afternoon.
Approximately like this:

NavBar::begin([
    'brandLabel' => Html::img('/images/logo.png', ['alt' => Yii::$app->name]) . 'Ваш текст',
    // остальной код
]);

M
Maxim Fedorov, 2017-08-12
@Maksclub

I found an example of how to set your output template:
and here's some more documentation:
www.yiiframework.com/doc-2.0/yii-widgets-menu.html...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question