Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Put logo between navigation list
#1
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?
Reply
#2
(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>'
    
}

Reply
#3
Thx!!
Reply
#4
It is possible to use the CSS or ready framework UIkit https://getsimplecms.ru/1/navigation.html
Reply
#5
(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"/>;
Reply




Users browsing this thread: 1 Guest(s)