How to add a logo or site name to nav-bar?

Permalink Browser Info Environment
Hi,

Would it be possible to add a logo or site name in the nag bar?

Like this? -http://getbootstrap.com (See the name on the top left? See attached image (circled in red) for more clarification)

Thanks in advance.

1 Attachment

Type: Discussion
Status: New
wagdi
View Replies:
GuillaumeAgresta replied on at Permalink Reply
GuillaumeAgresta
Hi,
Yes it is possible.

You need to edit the template used by the navbar block (example: file: .\theme_bootswatch\blocks\autonav\templates\header_menu.php)

Before the line (if exist):
<div class="nav-collapse collapse">


or before this line:
<ul class="nav">



And add the following code:

With site name:
<a class="navbar-brand" href="<?php echo DIR_REL?>">
   <?php
   $block = Block::getByName('My_Site_Name');
   if( $block && $block->bID ) $block->display();
   else echo SITE;
   ?>
</a>


With image (logo):
<a class="navbar-brand" href="<?php echo DIR_REL?>">
   <img src="<?php echo $this->getThemePath().'/logo/logo.png';?>" alt="<?php echo SITE;?>">
</a>



Best regards,

Guillaume.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.