Putting Logo Inside Tbnavbar

Hi there!

I’m trying to put my logo into the TbNavBar so I put this code

$this->widget('bootstrap.widgets.TbNavbar', array(                       

      'brand' => '<img src =" <?php echo Yii::app()->request->baseUrl; ?>/images/logo.jpg" />',


But the image doesn’t appear as expected.



Any suggestion would be appreciated!


Hi Trinh,

I think "echo" is causing the trouble. Try instead:

$this->widget('bootstrap.widgets.TbNavbar', array(                       

      'brand' => '<img src ="' . Yii::app()->request->baseUrl . '/images/logo.jpg" />',


thanks, this helped me!

Yii way :lol:


Generates missing alt="" for free :)