Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.0k views
in Q2A Core by

How can I move my field search like that photo ?


When I modified my qa-theme-base.php for moved the search box, I've got several search bar: one on header, one on nav bar and one in main. But i want only one on main.


I need help I don't know how can I make my idea.

Best regards.

Q2A version: 1.4.3

2 Answers

0 votes
by
 
Best answer
I've found the solution :

 

function header()

{
  $this->output('<DIV CLASS="qa-header">');
  $this->logo();
  //$this->nav_user_search();
  $this->nav_user();

}

  // function nav_user_search()
  // {
   // $this->nav('user');
   // $this->search();
  // }

function nav_user()

{
  $this->nav('user');

}

 

function main()
{
   $content=$this->content;

   $this->output('<DIV CLASS="qa-main'.(@$this->content['hidden'] ? ' qa-main-hidden' : '').'">');
  $this->search();

}

 

See ya !
0 votes
by
In order to remove search box from header, you should override nav_user_search() function.

    function nav_user_search() // remove search from here
        {
            //$this->search();  - remove search from here
            $this->nav('user');
        }

In order to put search form somewhere else, you just put search() into appropriate function.
by
function nav_user_search()
{
   //$this->search();  //Doesn't work :/
   $this->nav('user');
}

but

fonction main()
{
   $this->search(); //Work and the search bar is duplicated
}
...