Hello team wanted to add a logo in the nav bar before the home icon any shortcuts or any methods to achieve this

hello team wanted to add a logo in the nav bar before the home icon any shortcuts or any methods to achieve this …

You need to find navbar code by going to browser’s css code.

Then write your CSS custom code and do Empty cache and Hard reload on your browser to see changes.

SuiteCRM-8.5.1\public\legacy\themes\suite8\tpls_headerModuleList.tpl

{if $USE_GROUP_TABS}
  • {assign var="groupSelected" value=false} {foreach from=$moduleTopMenu item=module key=name name=moduleList} {if $name == $MODULE_TAB} {if $name != 'Home'}
  •   {sugar_link id="moduleTab_$name" module=$name data=$module}   {* check, is there any recent items *} {assign var=foundRecents value=false} {foreach from=$recentRecords item=item name=lastViewed} {if $item.module_name == $name} {assign var=foundRecents value=true} {/if} {/foreach}
                                    {* check, is there any favorite items *}
                                    {assign var=foundFavorits value=false}
                                    {foreach from=$favoriteRecords item=item name=lastViewed}
                                        {if $item.module_name == $name}
                                            {assign var=foundFavorits value=true}
                                        {/if}
                                    {/foreach}
                                    {if $foundRecents || $foundFavorits
                                    || (is_array($shortcutTopMenu.$name) && count($shortcutTopMenu.$name) > 0)}
    
                                        <ul class="dropdown-menu" role="menu">
                                            <li class="current-module-action-links">
                                                <ul>
                                                    {if is_array($shortcutTopMenu.$name)
                                                    && count($shortcutTopMenu.$name) > 0}
                                                        {foreach from=$shortcutTopMenu.$name item=item}
                                                            {if $item.URL == "-"}
                                                                {*<li><a></a><span>&nbsp;</span></li>*}
                                                            {else}
                                                                <li><a href="{$item.URL}"><span class="topnav-fake-icon">{* fakes the space the icon takes *}</span><span aria-hidden="true">{$item.LABEL}</span></a></li>
                                                            {/if}
                                                        {/foreach}
                                                    {/if}
                                                </ul>
                                            </li>
    
                                            {* when records are found for the current submodule show recent header *}
                                            {counter start=0 name="submoduleRecentRecordsTotal" assign="submoduleRecentRecordsTotal"  print=false}
                                            {foreach from=$recentRecords item=item name=lastViewed}
                                                {if $item.module_name == $name and $submoduleRecentRecordsTotal == 0}
                                                    <li class="recent-links-title"><a><strong>{$APP.LBL_LAST_VIEWED}</strong></a></li>
                                                    {counter name="submoduleRecentRecordsTotal" print=false}
                                                {/if}
                                            {/foreach}
                                            <li class="current-module-recent-links">
                                                <ul>
                                                    {* when records are found for the current submodule show the first 3 records *}
                                                    {counter start=0 name="submoduleRecentRecords" assign="submoduleRecentRecords"  print=false}
                                                    {foreach from=$recentRecords item=item name=lastViewed}
                                                        {if $item.module_name == $name and $submoduleRecentRecords < 3}
                                                            <li class="recentlinks" role="presentation">
                                                                <a title="{sugar_translate module=$item.module_name label=LBL_MODULE_NAME}"
                                                                   accessKey="{$smarty.foreach.lastViewed.iteration}"
                                                                   href="{sugar_link module=$item.module_name action='DetailView' record=$item.item_id link_only=1}" class="recent-links-detail">
    
                                                                    <span aria-hidden="true">{$item.item_summary_short}</span>
                                                                </a>
                                                                {capture assign='access'}{suite_check_access module=$item.module_name action='edit' record=$item.item_id }{/capture}
                                                                {if $access}
                                                                    <a href="{sugar_link module=$item.module_name action='EditView' record=$item.item_id link_only=1}" class="recent-links-edit"><span class=" glyphicon glyphicon-pencil"></a>
                                                                {/if}
                                                            </li>
                                                            {counter name="submoduleRecentRecords" print=false}
                                                        {/if}
                                                    {/foreach}
                                                </ul>
                                            </li>
    
    
    
    
    
                                            {counter start=0 name="submoduleFavoriteRecordsTotal" assign="submoduleFavoriteRecordsTotal"  print=false}
                                            {foreach from=$favoriteRecords item=item name=lastViewed}
                                                {if $item.module_name == $name and $submoduleFavoriteRecordsTotal == 0}
                                                    <li class="favorite-links-title"><a><strong>{$APP.LBL_FAVORITES}</strong></a></li>
                                                    {counter name="submoduleFavoriteRecordsTotal" print=false}
                                                {/if}
                                            {/foreach}
                                            <li class="current-module-favorite-links">
                                                <ul>
                                                    {* when records are found for the current submodule show the first 3 records *}
                                                    {counter start=0 name="submoduleFavoriteRecords" assign="submoduleFavoriteRecords" print=false}
                                                    {foreach from=$favoriteRecords item=item name=lastViewed}
                                                        {if $item.module_name == $name and $submoduleFavoriteRecords < 3}
                                                            <li class="favoritelinks" role="presentation">
                                                                <a title="{sugar_translate module=$item.module_name label=LBL_MODULE_NAME}"
                                                                   accessKey="{$smarty.foreach.lastViewed.iteration}"
                                                                   href="{sugar_link module=$item.module_name action='DetailView' record=$item.id link_only=1}" class="favorite-links-detail">
                                                                    <span class="suitepicon suitepicon-module-{$item.module_name|lower|replace:'_':'-'}"></span>
                                                                    <span aria-hidden="true">{$item.item_summary_short}</span>
                                                                </a>
                                                                {capture assign='access'}{suite_check_access module=$item.module_name action='edit' record=$item.id }{/capture}
                                                                {if $access}
                                                                    <a href="{sugar_link module=$item.module_name action='EditView' record=$item.id link_only=1}" class="favorite-links-edit"><span class=" glyphicon glyphicon-pencil" aria-hidden="true"></a>
                                                                {/if}
                                                            </li>
                                                            {counter name="submoduleFavoriteRecords" print=false}
                                                        {/if}
                                                    {/foreach}
                                                </ul>
                                            </li>
                                        </ul>
    
                                    {/if}
                                </li>
                            {/if}
    
                        {/if}
                    {/foreach}
                    {foreach from=$groupTabs item=modules key=group name=groupList}
                        {capture name=extraparams assign=extraparams}parentTab={$group}{/capture}
                        <li class="topnav {if $smarty.foreach.groupList.last}all{/if}">
                            <span class="notCurrentTabLeft">&nbsp;</span><span class="notCurrentTab">
                            <a href="#" id="grouptab_{$smarty.foreach.groupList.index}" class="dropdown-toggle grouptab">{$group}</a>
                            <span class="notCurrentTabRight">&nbsp;</span>
                            <ul class="dropdown-menu" role="menu" {if $smarty.foreach.groupList.last} class="All"{/if}>
                                {foreach from=$modules.modules item=module key=modulekey}
                                    <li>
                                        {capture name=moduleTabId assign=moduleTabId}moduleTab_{$smarty.foreach.moduleList.index}_{$module}{/capture}
                                        {sugar_link id=$moduleTabId module=$modulekey data=$module extraparams=$extraparams}
                                    </li>
                                {/foreach}
                                {foreach from=$modules.extra item=submodulename key=submodule}
                                    <li>
                                        <a href="{sugar_link module=$submodule link_only=1 extraparams=$extraparams}">{$submodulename}</a>
                                    </li>
                                {/foreach}
                            </ul>
                        </li>
                    {/foreach}
                </ul>
                {* 7.8 Hide filter menu items when the window is too small to display them *}
            {literal}
                <script>
                    var windowResize = function() {
                        // Since the height can be changed in Sass.
                        // Take a measurement of the initial desktop navigation bar height with just one menu item
                        $('.desktop-toolbar ul.navbar-nav > li').not('.all').addClass('hidden');
                        var dth = $('.desktop-toolbar').outerHeight();
    
                        // Show all desktop menu items
                        $('.desktop-toolbar ul.navbar-nav > li.hidden').removeClass('hidden');
    
                        // Remove the each menu item from the end of the toolbar until
                        // the navigation bar is the matches the initial height.
                        while($('.desktop-toolbar').outerHeight() > dth) {
                            ti = $('.desktop-toolbar ul.navbar-nav > li').not('.hidden').not('.all');
                            $(ti).last().addClass('hidden');
                        }
                    };
                    $(window).resize(windowResize);
                    $(document).ready(windowResize);
                </script>
            {/literal}
            {else}
    
                <ul class="nav navbar-nav navbar-horizontal-fluid">
                    <li class="navbar-brand-container">
                        <a class="navbar-brand with-home-icon" href="index.php?module=Home&action=index">
                            <span class="suitepicon suitepicon-action-home"></span>
                        </a>
                    </li>
                    {foreach from=$groupTabs item=modules key=group name=groupList}
                        {capture name=extraparams assign=extraparams}parentTab={$group}{/capture}
                    {/foreach}
    
                    <!--nav items with actions -->
                    {foreach from=$modules.modules item=submodulename key=submodule}
                        {if $submodule != "Home"}
                            <li class="topnav with-actions">
                                <span class="notCurrentTabLeft">&nbsp;</span>
                                <span class="dropdown-toggle headerlinks notCurrentTab"> <a href="{sugar_link module=$submodule link_only=1 extraparams=$extraparams}">{$submodulename}</a> </span>
                                <span class="notCurrentTabRight">&nbsp;</span>
                                <ul class="dropdown-menu" role="menu">
                                    <li>
                                        <ul>
                                            {if is_array($shortcutTopMenu) && count($shortcutTopMenu) > 0}
                                                {foreach from=$shortcutTopMenu.$submodule item=item}
                                                    {if $item.URL == "-"}
                                                        {*<li><a></a><span>&nbsp;</span></li>*}
                                                    {else}
                                                        <li><a href="{$item.URL}"><span class="topnav-fake-icon">{* fakes the space the icon takes *}</span><span aria-hidden="true">{$item.LABEL}</span></a></li>
                                                    {/if}
                                                {/foreach}
                                            {/if}
                                        </ul>
                                    </li>
                                    {* when records are found for the current submodule show recent header *}
                                    {counter start=0 name="submoduleRecentRecordsTotal" assign="submoduleRecentRecordsTotal"  print=false}
                                    {foreach from=$recentRecords item=item name=lastViewed}
                                        {if $item.module_name == $submodule and $submoduleRecentRecordsTotal == 0}
                                            <li class="recent-links-title"><a><strong>{$APP.LBL_LAST_VIEWED}</strong></a></li>
                                            {counter name="submoduleRecentRecordsTotal" print=false}
                                        {/if}
                                    {/foreach}
                                    <li>
                                        <ul>
                                            {* when records are found for the current submodule show the first 3 records *}
                                            {counter start=0 name="submoduleRecentRecords" assign="submoduleRecentRecords"  print=false}
                                            {foreach from=$recentRecords item=item name=lastViewed}
                                                {if $item.module_name == $submodule and $submoduleRecentRecords < 3}
                                                    <li class="recentlinks" role="presentation">
                                                        <a title="{sugar_translate module=$item.module_name label=LBL_MODULE_NAME}"
                                                           accessKey="{$smarty.foreach.lastViewed.iteration}"
                                                           href="{sugar_link module=$item.module_name action='DetailView' record=$item.item_id link_only=1}" class="recent-links-detail">
                                                            <span aria-hidden="true">{$item.item_summary_short}</span>
                                                        </a>
                                                        {capture assign='access'}{suite_check_access module=$item.module_name action='edit' record=$item.item_id }{/capture}
                                                        {if $access}
                                                            <a href="{sugar_link module=$item.module_name action='EditView' record=$item.item_id link_only=1}" class="recent-links-edit"><span class=" glyphicon glyphicon-pencil"></a>
                                                        {/if}
                                                    </li>
                                                    {counter name="submoduleRecentRecords" print=false}
                                                {/if}
                                            {/foreach}
                                        </ul>
                                    </li>
                                    {* when records are found for the current submodule show favorites header *}
                                    {counter start=0 name="submoduleFavoriteRecordsTotal" assign="submoduleFavoriteRecordsTotal"  print=false}
                                    {foreach from=$favoriteRecords item=item name=lastViewed}
                                        {if $item.module_name == $submodule and $submoduleFavoriteRecordsTotal == 0}
                                            <li class="favorite-links-title"><a><strong>{$APP.LBL_FAVORITES}</strong></a></li>
                                            {counter name="submoduleFavoriteRecordsTotal" print=false}
                                        {/if}
                                    {/foreach}
                                    <li>
                                        <ul>
                                            {* when records are found for the current submodule show the first 3 records *}
                                            {counter start=0 name="submoduleFavoriteRecords" assign="submoduleFavoriteRecords" print=false}
                                            {foreach from=$favoriteRecords item=item name=lastViewed}
                                                {if $item.module_name == $submodule and $submoduleFavoriteRecords < 3}
                                                    <li class="favoritelinks" role="presentation">
                                                        <a title="{sugar_translate module=$item.module_name label=LBL_MODULE_NAME}"
                                                           accessKey="{$smarty.foreach.lastViewed.iteration}"
                                                           href="{sugar_link module=$item.module_name action='DetailView' record=$item.id link_only=1}" class="favorite-links-detail">
                                                            <span aria-hidden="true">{$item.item_summary_short}</span>
                                                        </a>
                                                        {capture assign='access'}{suite_check_access module=$item.module_name action='edit' record=$item.id }{/capture}
                                                        {if $access}
                                                            <a href="{sugar_link module=$item.module_name action='EditView' record=$item.id link_only=1}" class="favorite-links-edit"><span class=" glyphicon glyphicon-pencil" aria-hidden="true"></a>
                                                        {/if}
                                                    </li>
                                                    {counter name="submoduleFavoriteRecords" print=false}
                                                {/if}
                                            {/foreach}
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                        {/if}
                    {/foreach}
                    {if count($moduleExtraMenu) > 0}
                        <li class="topnav overflow-toggle-menu">
                            <span class="notCurrentTabLeft">&nbsp;</span>
                            <span class="dropdown-toggle headerlinks notCurrentTab"><a href="#">{$APP.LBL_MORE}</a></span>
                            <span class="notCurrentTabRight">&nbsp;</span>
                            <ul id="overflow-menu" class="dropdown-menu" role="menu">
                                <!--nav items without actions -->
                                {foreach from=$modules.extra item=submodulename key=submodule}
                                    <li class="topnav without-actions">
                                        <span class=" notCurrentTab"> <a href="{sugar_link module=$submodule link_only=1 extraparams=$extraparams}">{$submodulename}</a> </span>
                                    </li>
                                {/foreach}
                            </ul>
                        </li>
                    {/if}
                </ul>
                <div class="hidden hidden-actions"></div>
                {* Hide nav items when the window size is too small to display them *}
            {literal}
                <script>
                    var windowResize = function() {
                        // reset navbar
                        var $navCollapsedItems = $('ul#overflow-menu > li.with-actions');
                        if(typeof $navCollapsedItems !== "undefined") {
                            $($navCollapsedItems).each(function() {
                                $(this).addClass('topnav');
                                $(this).insertBefore('.overflow-toggle-menu');
                            });
                        }
    
    
    
                        var $navItemMore = $('.navbar-horizontal-fluid > li.overflow-toggle-menu'),
                            $navItems = $('.navbar-horizontal-fluid > li.with-actions'),
                            navItemMoreWidth = navItemWidth = $navItemMore.width(),
                            windowWidth = $(window).width() - ($(window).width()  * 0.55),
                            navItemMoreLeft, offset, navOverflowWidth;
    
                        $navItems.each(function() {
                            navItemWidth += $(this).width();
                        });
    
                        // Remove nav items that are cause the right hand nav-bar items to wrap
                        while (navItemWidth > windowWidth) {
                            navItemWidth -= $navItems.last().width();
                            $navItems.last().removeClass('topnav');
                            $navItems.last().prependTo('#overflow-menu');
                            $navItems.splice(-1,1);
                        }
                        if(typeof $navItemMoreLeft !== "undefined") {
                            navItemMoreLeft = $('.navbar-horizontal-fluid .overflow-toggle-menu').offset().left;
                            navOverflowWidth = $('#overflow-menu').width();
                            offset = navItemMoreLeft + navItemMoreWidth - navOverflowWidth;
                        }
                    };
                    $(window).resize(windowResize);
                    windowResize();
                </script>
            {/literal}
    
            {/if}
        </div>
    

    This is the code and i am adding an img tag of my logo before “home” but not reflecting in browser if you please share me the code were exactly to be modified it would help me a lot …