WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<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>
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.
<?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>
<?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');?>
<div class="menu"><?php echo $topnav; ?></div>
All country landing pages (like: /wb/pages/fre.php ) are giving a status 500 (Server error), but the pages are served fine.This points to some server or .htaccess fault.
There are some "lost </div>'s" in the output.Use Firefox, do Ctrl-U (source view) and look for red </div> lines.
A script is loaded that generates a 404 error (not found)./wb/templates/bs_naturak/js/responsive-slider.js does not exist.
(edit: you can always remove the url in your previous posts if you do not want it shown anymore)
...relevant for each language button I want displayed, but it's not showing the image icon.
In show_menu2 find line for $aItemFormat = '[if(page_id==X1){[a]<img src=" .WB_URL ."/media/flags/[menu_title].gif />[/a] }][if(page_id==X2){[a]<img src=" .WB_URL ."/media/flags/[menu_title].gif />[/a] }][if(page_id==X3){[a]<img src=" .WB_URL ."/media/flags/[menu_title].gif />[/a] }]',
<?php show_menu2( $aMenu, $aStart, $aMaxLevel, $aOptions, '[li][a][if(target==_self){<img src="'.WB_URL.'/templates/'.TEMPLATE. '/flags/[menu_title].gif" alt="[menu_title]">}else{[memu_title]}]</a>', '[/li]', '[ul]', '[/ul]', false, false );
$open = '<li class="[if(class=menu-current||class=menu-parent){active}] [if(class==menu-expand){dropdown}]"> [if(class==menu-expand){<a href="[url]" class="dropdown-toggle" data-toggle="dropdown">[menu_title] <b class="caret"></b></a>}else {<a href="[url]" class="pid[page_id]">[menu_title]</a>}]';
$topnav = ob_get_contents();and add line below it:$topnav = preg_replace('/<a (.*?) class="pid(5|6)">(.*?)<\/a>/', '<a $1><img src="'.TEMPLATE_DIR.'/flags/'.strtolower("$3").'.png" /></a>', $topnav);
open nav.php (from bs_naturak/snippet) and replace $open withCode: [Select]$open = '<li class="[if(class=menu-current||class=menu-parent){active}] [if(class==menu-expand){dropdown}]"> [if(class==menu-expand){<a href="[url]" class="dropdown-toggle" data-toggle="dropdown">[menu_title] <b class="caret"></b></a>}else {<a href="[url]" class="pid[page_id]">[menu_title]</a>}]';Notice I added class="pid[page_id]" with which we will match menu items to replace with images.Now locate line Code: [Select]$topnav = ob_get_contents();and add line below it:$topnav = preg_replace('/<a (.*?) class="pid(5|6)">(.*?)<\/a>/', '<a $1><img src="'.TEMPLATE_DIR.'/flags/'.strtolower("$3").'.png" /></a>', $topnav);Notice pid(5|6) ! 5 and 6 are page_id-s for which we need images. so you can add more and separate with pipe | for example 5|6|10|25|100in bs_naturak create folder /flags and put images there. Image names must be same as menu name but lowercase eg: if menu name is Ger image is ger.png
I would suggest you to use css to push images little up.
.nav > li > a > img { max-width: none; margin-top: -10px; }
here it is:Code: [Select].nav > li > a > img { max-width: none; margin-top: -10px; }