Author Topic: Help with menu?  (Read 1554 times)

Offline rumen

  • Posts: 452
  • Gender: Male
Help with menu?
« 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  but on the first page it doesn't and it doesn't work.

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

Offline dbs

  • Betatester
  • **
  • Posts: 8737
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Help with menu?
« Reply #1 on: June 27, 2022, 12:12:15 PM »
Hi, try
Code: [Select]
$aStart         = SM2_ROOT+$Multilang,
And take a look at the DefaultTemplate.

Offline rumen

  • Posts: 452
  • Gender: Male
Re: Help with menu?
« Reply #2 on: June 27, 2022, 01:32:24 PM »
No, without +1 after sm2_root it shows just the Language and nothing happens, just try to download some html file when click.

Offline rumen

  • Posts: 452
  • Gender: Male
Re: Help with menu?
« Reply #3 on: June 27, 2022, 01:38:16 PM »

Offline dbs

  • Betatester
  • **
  • Posts: 8737
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Help with menu?
« Reply #4 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.

Offline rumen

  • Posts: 452
  • Gender: Male
Re: Help with menu?
« Reply #5 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) {
?>

Offline rumen

  • Posts: 452
  • Gender: Male
Re: Help with menu?
« Reply #6 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!!!

Offline hgs

  • Betatester
  • **
  • Posts: 1555
    • EFG MG
Re: Help with menu?
« Reply #7 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?
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline rumen

  • Posts: 452
  • Gender: Male
Re: Help with menu?
« Reply #8 on: June 27, 2022, 09:03:37 PM »
It is multilingual BG / EN, but still didn't show the both languages on the screen, but they are setup inside