WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Can I have a nav menu of text links AND images?

(1/4) > >>

seanie_morris:
Hi all,

This would be the intended sample menu structure that I want:

|  Home (text)  |  Menu 2 (text)  |  Menu 3 (text)  |  French (.jpg)  |  German (.jpg)  |

When I created the new page French, I used the Code creation method, and tried the following code so that I could add a little French flag image instead of using text for the link:


--- Code: ---<a href="http://www.websitename.com/wb/pages/french.php"><img src="http://www.websitename.com/wb/templates/bs_naturak/img/flag-france-small.png" alt="French language" width="34" height="34" border="0"></a>
--- End code ---

but all that will display is the word "French". It still works as a link, but how do I get the image to display instead of the text? I confirmed the correct link to the image in my own site.

I did a search and found multiple variations as well as similar requests to mine, but with no conclusions (and most of them going back to 2008 and 2009).

Thanks,

Seanie.

P.S. I am using the bs_naturak template.

Ruud:
The simple answer is that if you do not see the flag but just the alt text, the url to the flag is wrong.
Without a link it is impossible to say more.

seanie_morris:

--- Quote from: Ruud on August 26, 2015, 10:55:06 PM ---The simple answer is that if you do not see the flag but just the alt text, the url to the flag is wrong.

--- End quote ---

That's what would be the first assumption, but copying the path link to the image directly into the browser picks up the image, so I know that is not the problem... ;)

Ruud:
Maybe some javascript...
Maybe an addblocker or browser plugin..
Maybe a faulty serverconfiguration ..
Maybe a wrong .htacces file..
Maybe something else..

Looking at errorlogs might help..
Looking with webdeveloper tools (F12 in most browsers) might show something..

--- Quote from: Ruud on August 26, 2015, 10:55:06 PM ---Without a link it is impossible to say more.

--- End quote ---

seanie_morris:

--- Quote from: Ruud on August 27, 2015, 10:29:29 AM ---Without a link it is impossible to say more.
--- End quote ---

I usually don't like showing links when I'm in 'under construction' mode, but here it is:

http://www.annaharveyfarm.com/wb

The menu call function in this particular template from index.php is:


--- Code: ---<?php 
 
if (!isset($page_id) OR $page_id==1 OR $page_id==1) {
include('snippets/responsiveslides.php');
include('snippets/nav.php');
include('snippets/site-headline.php');
include('snippets/grids3.php');
} else {
include('snippets/nav.php');
}

include('snippets/playground.php');
include('snippets/2col-content.php');

?>[code]

and the piece doing the calling for the menu in nav.php is:

[code]<div class="menu">
<?php echo $topnav; ?>
</div>
--- End code ---

I tried the show_menu2() variations and no joy (I didn't expect it to work anyway, as this template is doing a different calling).

Navigation

[0] Message Index

[#] Next page

Go to full version