Move Search Box

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

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

Move Search Box

Post by camel_Trophy »

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: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Move Search Box

Post by Thorsten »

Hi,

it's the main.tpl template file.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy »

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: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Move Search Box

Post by Thorsten »

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: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy »

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 »

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: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Move Search Box

Post by camel_Trophy »

Hello Melanie,

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

Which template did you modify?

Thanks,

Gibran
Post Reply