WebsiteBaker Community Forum

WebsiteBaker Support (2.11.x) => General Help & Support => Topic started by: rumen on June 27, 2022, 11:56:45 AM

Title: Help with menu?
Post 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.

Code: [Select]
$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
Title: Re: Help with menu?
Post by: dbs on June 27, 2022, 12:12:15 PM
Hi, try
Code: [Select]
$aStart         = SM2_ROOT+$Multilang,
And take a look at the DefaultTemplate.
Title: Re: Help with menu?
Post by: rumen on June 27, 2022, 01:32:24 PM
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.
Title: Re: Help with menu?
Post by: rumen on June 27, 2022, 01:38:16 PM
This is what I mean (https://zapryanov.faith/cloud/index.php/s/jx8aa43PMcGaoLS)
Title: Re: Help with menu?
Post by: dbs on June 27, 2022, 02:42:07 PM
Quote
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.
Title: Re: Help with menu?
Post by: rumen on June 27, 2022, 03:37:52 PM
I think I set that:

Code: [Select]
<?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

Code: [Select]
<?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) ? 0);}
    if (
function_exists('LangPadeId')&&$iMultiLang) {
?>
Title: Re: Help with menu?
Post by: rumen on June 27, 2022, 04:00:48 PM
Solved! The problem was in a JS for a slider. It made a conflict somehow.

Thanks a lot for the help!!!
Title: Re: Help with menu?
Post by: hgs on June 27, 2022, 07:59:56 PM
Question: Is the site multilingual, or is there only the one language, as seen in the picture?
Title: Re: Help with menu?
Post by: rumen on June 27, 2022, 09:03:37 PM
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