A
A
Alexander Ivanov2015-06-19 11:00:30
Yii
Alexander Ivanov, 2015-06-19 11:00:30

How can I replace the getAssetsUrl method with upi (Yii)?

This is what the widget looks like by default:

$this->widget(
    'bootstrap.widgets.TbNavbar',
    [
        'collapse' => true,
        'brand' => CHtml::image(
            Yii::app()->getTheme()->getAssetsUrl() . '/images/logo.png',
            Yii::app()->name,
            [
                'width' => '38',
                'height' => '38',
                'title' => Yii::app()->name,
            ]
        ),

The getAssetsUrl() method loads the path to the assets folder. How to make it load an image from without this path, or even completely disable loading a file from assets?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Litvin, 2015-06-19
@cimonlebedev

Try replacing this - Yii::app()->getTheme()->getAssetsUrl() . '/images/logo.png' to your path.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question