Author Topic: search_keyword doesn't pass on to next page on search  (Read 5661 times)

0 Members and 1 Guest are viewing this topic.

Offline kitty999

  • Newbie
  • *
  • Posts: 21
    • View Profile
search_keyword doesn't pass on to next page on search
« on: July 26, 2017, 07:44:34 PM »
I put {search_keywords} in my search.html page and it works fine. When someone searches for something it displays the keyword.

My problem is this: when someone clicks the next page in search the {search_keyword} must get reset because it shows nothing. It only shows the keyword on that initial first search page.

Anyone have any ideas how to fix this?


Offline kitty999

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: search_keyword doesn't pass on to next page on search
« Reply #1 on: August 05, 2017, 06:26:16 AM »
In case anyone is interested I think I figured it out!


In global.php find this:

$self_url .= "show_result=1";

And change it to this:

$self_url .= "show_result=1&search_fields=".$search_fields."&search_keywords=".$search_keywords;


------------------------

In search.php find this:

$link_arg = $site_sess->url(ROOT_PATH."search.php?show_result=1");

And change it to this:

$link_arg = $site_sess->url(ROOT_PATH."search.php?show_result=1&search_fields=".$search_fields."&search_keywords=".$search_keywords);


-------------------

Now you can place {search_keywords} as a title on your search page and it will work even when you go to the next page or if you use the sort mod to sort the images.

I'm using 4images 1.7 and so far it seems to work without a hitch