Author Topic: Under construction problem  (Read 187 times)

Offline jacobi22

  • Posts: 3795
    • Jacobi22
Re: Under construction problem
« Reply #25 on: February 17, 2017, 04:41:32 PM »
somethings go'es wrong in the php-file or in commons.js - it doesnt switch back the menu-block to display:none

maybe, you can try with my index.php, but rename your file at first

Offline rumen

  • Posts: 228
Re: Under construction problem
« Reply #26 on: February 17, 2017, 05:07:02 PM »
Mobile menu now works! But missing the "Home" from the menu and the drop-down doesn't work.




Offline jacobi22

  • Posts: 3795
    • Jacobi22
Re: Under construction problem
« Reply #27 on: February 17, 2017, 07:26:34 PM »
maybe a combination of Level and show_menu2-Call

here the call from the ZIP

show_menu2(SM2_ALLMENUSM2_ROOTSM2_ALL,SM2_CRUMB'<span class="[class]">[a][menu_title]</a></span>''''''''<span><a href="/">Вие ÑÑ‚е Ñ‚ук: </a> >> </span> <span class="[class]">[a][menu_title] >> </a></span>');

means: start in the root of wb - goes over all levels and build a breadcrumb - if you work with different menu-id's, maybe SM2_ALLMENU is not the best solution here, use the ID from the main menu here

Offline rumen

  • Posts: 228
Re: Under construction problem
« Reply #28 on: February 17, 2017, 08:45:01 PM »
The code from the WB template works fine, so combination between is OK ... now I need to fix only the drop-down and the menu is ready!

This code works fine:

Code: [Select]
<?php
                
echo show_menu2(SM2_ALLMENUSM2_ROOTSM2_CURR+1SM2_ALL|SM2_BUFFER|SM2_PRETTY|SM2_NUMCLASS,'<li><span class="active">[ac][menu_title]</a></span>','</li>','<ul class="nav">','</ul>');
                
?>

Offline jacobi22

  • Posts: 3795
    • Jacobi22
Re: Under construction problem
« Reply #29 on: February 17, 2017, 08:53:26 PM »
look into my posted zip and specially to the menu-code

the <span> destroy your menu and stop the drop&down-function, because, every li has now the class "active" with your code - try a solution like this for the submenu


$subnav 
show_menu2(
                  
$aMenu          1,
                  
$aStart         SM2_ROOT,
                  
$aMaxLevel      SM2_START+1,
                  
$aOptions       SM2_TRIM|SM2_BUFFER|SM2_PRETTY|SM2_NUMCLASS,
                  
$aItemOpen      '<li class="[if(class=menu-current){active}][if(class=menu-parent){ parent}]">[ac][menu_title]</a>',
                  
$aItemClose     '</li>',
                  
$aMenuOpen      '<ul class="accordion">',
                  
$aMenuClose     '</ul>',
                  
$aTopItemOpen   false,
                  
$aTopMenuOpen   false
);
                  echo 
$subnav;

Offline rumen

  • Posts: 228
Re: Under construction problem
« Reply #30 on: February 17, 2017, 09:28:32 PM »
A, yes this is solution for the mobile menu, but I speak about the main menu :)

 

postern-length