Move Search Box

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
camel_Trophy
Posts: 32
Joined: Fri Feb 17, 2017 5:03 pm

Move Search Box

Post by camel_Trophy » Tue Mar 28, 2017 6:33 pm

Greetings all,

I search the forum I did not find the answer, dropping the question for little help.

How can I move the search box above the "Popular Search Words" box and make it about the same size? I want the search box to be the focus of the landing page.

Thank you,

Gibran

Thorsten
Posts: 14482
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Move Search Box

Post by Thorsten » Wed Mar 29, 2017 8:20 am

Hi,

it's the main.tpl template file.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

camel_Trophy
Posts: 32
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy » Wed Mar 29, 2017 2:15 pm

Hello Thorsten,

I moved the search section from index.tpl to main.tpl as seen below, but the darn search box overlaps with the "Popular Search Words" box. I know I need to add some additional HTML stuff, any suggestions?
<Section>
<div class="pmf-searchbox">
<form role="search" id="search" action="{writeSendAdress}" method="get">
<input type="hidden" name="action" value="search">
<button class="searchbutton" type="submit" aria-label="{searchBox}">
<i aria-hidden="true" class="fa fa-search"></i>
</button>
<input type="text" class="searchfield typeahead" name="search" id="searchbox"
autocomplete="off" placeholder="{searchBox} ...">
</form>
</div>
</Section>

[tagListSection]
<div class="well clearfix">
<h3>{msgTags}</h3>
<ul class="pmf-tags">
{tagList}
</ul>
</div>
[/tagListSection]

<section>
<article>
{writeNews}
</article>
<footer>
{showAllNews}
{writeNewsRSS}
</footer>
<p class="text-center">{writeNumberOfArticles}</p>
</section>
You do not have the required permissions to view the files attached to this post.

Thorsten
Posts: 14482
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Move Search Box

Post by Thorsten » Wed Mar 29, 2017 4:23 pm

HI,

maybe you can add a <div> container around the popular tags.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

camel_Trophy
Posts: 32
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy » Wed Mar 29, 2017 7:20 pm

Hello Thorsten,

That did not work. I also tried using <section> tages with no luck, I moved the search below the "news feed" and it messed up the whole page.

Thanks,

Gibran

melanie.jones
Posts: 3
Joined: Sun Mar 12, 2017 2:26 am

Re: Move Search Box

Post by melanie.jones » Thu Mar 30, 2017 11:52 pm

I had the same problem, and I don't know whether my solution would suit your or not. Ultimately I moved the searchbox in the subheader to the center and made it much larger, added text above that directing user to search. This searchbox displays at header of every page so is always easily accessible/prominent.

camel_Trophy
Posts: 32
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy » Fri Mar 31, 2017 3:52 pm

Hello Melanie,

That might work, doesn't hurt to try :)

Which template did you modify?

Thanks,

Gibran

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest