WebsiteBaker Community Forum
WebsiteBaker Support (2.11.x) => General Help & Support => Topic started by: rumen on June 27, 2022, 11:56:45 AM
-
Please some help with menu of the template
Hi there,
I installed on of the templates - "schoppig". When I click on any of the internal pages the "drop-down" appears (https://i.imgur.com/J7CNVeV.png) but on the first page it doesn't and it doesn't work (https://i.imgur.com/rhg8mdS.png).
The code is the standard for the template I just added $multilang and sm2_root+1 because of the language.
$mainnav = show_menu2(
$aMenu = 1,
$aStart = SM2_ROOT+1+$Multilang,
$aMaxLevel = SM2_ALL,
$aOptions = SM2_ALL|SM2_PRETTY|SM2_BUFFER,
$aItemOpen = '<li><a href="[url]" class="[class]" target="[target]">[menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul>',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = '<ul class="chevron">'
);
$metanav = show_menu2(
$aMenu = 2,
$aStart = SM2_ROOT+1+$Multilang,
$aMaxLevel = SM2_START,
$aOptions = SM2_ALL|SM2_BUFFER,
$aItemOpen = '<li><a href="[url]" class="[class]" target="[target]">[menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul>',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = '<ul class="chevron right">'
);
What else need to fix it?
Thanks in advance!
Regards,
Rumen
-
Hi, try
$aStart = SM2_ROOT+$Multilang,
And take a look at the DefaultTemplate.
-
No, without +1 after sm2_root it shows just the Language (https://i.imgur.com/hqpVGXZ.png) and nothing happens, just try to download some html file when click.
-
This is what I mean (https://zapryanov.faith/cloud/index.php/s/jx8aa43PMcGaoLS)
-
And take a look at the DefaultTemplate.
Do this.
Search in the index.php for $Multilingual. This is also a number, therfore makes your solution with +1+Multilingual no sense.
You should find a code part where $Multilingual becomes 1 or 0.
-
I think I set that:
<?php
/* -------------------------------------------------------- */
// Must include code to stop this file being accessed directly
if (!defined('SYSTEM_RUN')) {header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); echo '404 File not found'; flush(); exit;}
/* -------------------------------------------------------- */
ob_start(); //fetch MainContent
page_content(1);
$page_contentMain = \ob_get_clean();
ob_start(); //fetch original header content
page_content(2);
$page_contentTeaser = \ob_get_clean();
ob_start(); //fetch original header content
page_content(3);
$page_contentSidebar = \ob_get_clean();
$sPageLang = strtolower(isset($wb->page) || ($wb instanceof frontend) ? $wb->page['language'] : 'BG');
$iPageId = (defined('PAGE_ID') ? PAGE_ID : 0);
// TEMPLATE CODE STARTS BELOW
?>
And that
<?php
if (!function_exists('LangPadeId')) {function LangPadeId(){return $iPageId;}}
// to show flags in frontend
$iMultiLang = 0;$sMultiLang = ''; if (function_exists('language_menu')){$sMultiLang = language_menu('png',false); $iMultiLang = intval(!empty($sMultiLang) ? 1 : 0);}
if (function_exists('LangPadeId')&&$iMultiLang) {
?>
-
Solved! The problem was in a JS for a slider. It made a conflict somehow.
Thanks a lot for the help!!!
-
Question: Is the site multilingual, or is there only the one language, as seen in the picture?
-
It is multilingual BG / EN (https://i.imgur.com/4WjMIaN.png), but still didn't show the both languages on the screen, but they are setup inside