WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Mobile menu and search code
  • Print
Pages: [1]   Go Down

Author Topic: Mobile menu and search code  (Read 13371 times)

Offline rumen

  • Posts: 480
  • Gender: Male
Mobile menu and search code
« on: May 25, 2018, 07:54:33 PM »
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: [Select]
<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 -->

2. The mobile menu doesn't respond at all

Original code from the HTML here:

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



My code here:

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


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

Code: [Select]
<div class="menu-nav-icon" data-nav-menu="#main-menu"><i class="ion-navicon"></i></div>
Thanks and regards,

Rumen



Logged

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Mobile menu and search code
« Reply #1 on: May 25, 2018, 09:21:33 PM »
I fixed the "Search" it was pure CSS issue!!!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Mobile menu and search code
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2