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

Mobile menu and search code

(1/1)

rumen:
I started new page under WB 2.11 ( test here http://mirchev.biz/pages/test.php ) , but I have 2 issues:

1. The "Search" doesn't call new page with the results

https://prnt.sc/jmlo86

with this code:


--- Code: ---<div class="src-area">

<button class="src-btn" type="submit"><i class="ion-ios-search-strong"></i></button>
<?php if(SHOW_SEARCH) { ?>
<div class="search_box">
  <form name="search" action="<?php echo WB_URL; ?>/search/index.php" method="get">
  <input type="hidden" name="referrer" value="<?php echo defined('REFERRER_ID')
   ? REFERRER_ID : PAGE_ID; ?>" />
    <input type="text" name="string"  placeholder="Search" class="search_string" />
    <input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" />
  </form>
</div>
<?php } ?>
</div><!-- src-area -->
--- End code ---

2. The mobile menu doesn't respond at all

Original code from the HTML here:


--- Code: ---<div class="middle-menu center-text"><a href="#" class="logo"><img src="images/logo.png" alt="Logo Image"></a></div>

<div class="bottom-area">

<div class="menu-nav-icon" data-nav-menu="#main-menu"><i class="ion-navicon"></i></div>

<ul class="main-menu visible-on-click" id="main-menu">
<li class="drop-down"><a href="#!">HOME<i class="ion-ios-arrow-down"></i></a>

<ul class="drop-down-menu">
<li><a href="#">FEATURED</a></li>
<li><a href="#">ABOUT</a></li>
<li class="drop-down"><a href="#!">CATEGORIES<i class="ion-ios-arrow-right"></i></a>
<ul class="drop-down-menu drop-down-inner">
<li><a href="#">FEATURED</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">CATEGORIES</a></li>
</ul>
</li>
</ul>

</li>
<li><a href="#">FEATURED</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">CATEGORIES</a></li>
<li><a href="#">CONTACT</a></li>
</ul><!-- main-menu -->
--- End code ---



My code here:


--- Code: --- <div class="menu-nav-icon" data-nav-menu="#main-menu"><i class="ion-navicon"></i></div>


<?php 
$open = '<li class="[if(class=menu-current||class=menu-parent){active}] [if(class==menu-expand){dropdown}]">
[if(class==menu-expand){<a href="[url]" class="dropdown-toggle" data-toggle="dropdown">[menu_title]<b class="caret"></b></a>}
else {<a href="[url]">[menu_title]</a>}]';
show_menu2(
$aMenu          = 1,
$aStart         = SM2_ROOT, 
$aMaxLevel      = SM2_CURR+1,
$aOptions       = SM2_ALL,
$aItemOpen      = $open,
$aItemClose     = '</li>',
$aMenuOpen      = '<ul class="[if(level==0){main-menu visible-on-click} else {dropdown-menu}]">',
$aMenuClose     = '</ul>',
$aTopItemOpen   = false,
$aTopMenuOpen   = false
);?>
--- End code ---


Should I include this code into the PHP code of the menu somehow in order the mobile menu to start working?


--- Code: ---<div class="menu-nav-icon" data-nav-menu="#main-menu"><i class="ion-navicon"></i></div>
--- End code ---

Thanks and regards,

Rumen



rumen:
I fixed the "Search" it was pure CSS issue!!!

Navigation

[0] Message Index

Go to full version