WebsiteBaker Support (2.12.x) > General Help & Support

Question about "sticky" option of menu within SM2 in WB

(1/3) > >>

rumen:
Hi there,

I wounder if I can use a "sticky" menu option in WB and I try on good menu, but whatever I try I loose the dropdown and the sticky.  Attached all files.  I try many hours to make it but can't make it work until now. The code last try is:


--- Code: ---<?php 
$open = '<li class="[if(class=menu-parent){active}]'
                .   '[if(class==menu-expand){hassubs}]">'
                .   '[if(class==menu-expand)'
                    .   '{<a href="[url]" class="">[menu_title]<b class="caret"></b> <i class="fa fa-chevron-down"></i></a>}'
                . 'else'
                    .   '{<a href="[url]">[menu_title]</a>}'
                . ']';
echo show_menu2(
$aMenu          = 1,
$aStart         = SM2_ROOT+$iMultiLang, 
$aMaxLevel      = SM2_CURR+2,
$aOptions       = SM2_ALL|SM2_PRETTY,
$aItemOpen      = $open,
$aItemClose     = '</li>',
$aMenuOpen      = '<ul>',
$aMenuClose     = '</ul>',
$aTopItemOpen   = false,
$aTopMenuOpen   = '<ul class="menu vertical medium-horizontal">'
);?>
--- End code ---

dbs:
Hi, if you want use own scripts like

--- Code: ---<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
--- End code ---
You have to deactivate the line
--- Code: ---register_frontend_modfiles('jquery');
--- End code ---
And you have to check the filter "RegisterModFiles" in Admin-Tools > Output Filter Frontend

It is not easy to use, i know.
Check the checkbox "RegisterModFiles" means:
- use the template like in old times.
- ignore the filter "Jquery".
- Use the register_frontend_m odfiles('xxx') in the index.php.
Mouseover on this filter should display some more informations.

In this moment it looks for me so: you haven't checked the checkbox RegisterModFiles. The filter Jquery is checked and load jQuery.Also your line with jquery-2.2.4 is active. So you have 2 times jquery loaded, and this is not good.
Hope it helps.

rumen:
Hi there,

I sent the original files, in the system I have all that in place see here and here.

It is free menu script and looks nice. Anyone can use it and that's why I try to make it works, so any of us here can use it some day if need. So far unfortunately no any success.

LudwigSt:

--- Quote from: rumen on June 11, 2020, 08:17:05 AM --- but whatever I try I loose the dropdown and the sticky. 

--- End quote ---
The css classes of everything belonging to the dropdown are not declared, as far as I can see on the first look.

dbs:
Maybe it was a misunderstanding.
Not deactivate your line with jquery-2.2.4.
Deactivate the line
--- Code: ---register_frontend_modfiles('jquery');
--- End code ---

The order of the scripts is important.
First jQuery, then the rest of the JS.

Navigation

[0] Message Index

[#] Next page

Go to full version