You are here:  » search box in nav bar on the right


search box in nav bar on the right

Submitted by paullas on Sun, 2016-01-17 17:23 in

Hi David.

Is it possible to have the search box inside the navigation menu to the right of the nav bar.

thanks

Paul

Submitted by support on Mon, 2016-01-18 12:45

Hi Paul,

Sure - Foundation has styling defined for inclusion of forms in the top-bar. In html/menu.php look for the following code at line 41:

  </section>

...and REPLACE with:

    <ul class='right'>
      <li class='has-form'>
        <form name='search' action='<?php print $config_baseHREF ?>search.php'>
          <div class='row collapse'>
            <div class='large-8 small-9 columns'>
              <input type='text' required='required' name='q' value='<?php print ((isset($q) && !isset($parts[1]) && !isset($product["products"]))?$q:""); ?>'>
            </div>
            <div class='large-4 small-3 columns'>
              <input type='submit' class='button expand' value='<?php print translate("Search"); ?>' />
            </div>
          </div>
        </form>
      </li>
    </ul>
  </section>

With that in place you can then replace html/searchform.php with an empty file...

Cheers,
David.
--
PriceTapestry.com