GetSimple Support Forum

Full Version: Put logo between navigation list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys!

Im looking for a way to put a logo between <li> tags in the navigation provided with i18n Navigation.

So the code would look like:

PHP Code:
<ul>
    <
li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<img src="LOGO_HERE.PNG" />
    <
li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
</ul

any idea?
(2019-06-20, 22:19:04)SalamandersPL Wrote: [ -> ]any idea?

Here's the solution,
not tested!

PHP Code:
$menu_data return_i18n_menu_data(...)
$x count($menu_data) \ 2

foreach (
$menu_data as $item){
    
$i += 1;
    if(
$i == $x ){
        echo 
'<img src="LOGO_HERE.PNG" />'
    
}else{
        echo
'<li><a href=".$item[url]." title=".$item[title].">.$item[xxx].</a></li>'
    
}

Thx!!
It is possible to use the CSS or ready framework UIkit https://getsimplecms.ru/1/navigation.html
(2019-06-20, 22:19:04)SalamandersPL Wrote: [ -> ]Hello guys!

Im looking for a way to put a logo between <li> tags in the navigation provided with i18n Navigation.

So the code would look like:

PHP Code:
<ul>
    <
li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<img src="LOGO_HERE.PNG" />
    <
li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
    
<li><a href="#" title="#">#</a></li>
</ul

any idea?

always you can use jquery, and replace .index class or create blank page and add to menu and use him class to change for img.

like example:

$('navbar .index').html('<img src="logo"/>');

or javascript

document.querySelector('navbar .index').innerHTML = <img src="logo"/>;