Forums / Install & configuration / Search results and php in cgi mode, part 2

Search results and php in cgi mode, part 2

Author Message

Vjeran Vlahovic

Monday 02 May 2005 2:10:56 am

I've changed all search form submit methods from GET to POST as Lukasz suggested in http://www.ez.no/community/forum/install_configuration/kernel_20_search
and that did the trick when search forms are submited, but there is one more issue to be solved.

Paging of search results is also done by submiting GET parameters, so link to the next page looks like this:

/index.php?/hr/content/search/(offset)/10?SearchText=bla

which, of course, doesn't work because of double question mark.

Anyone who solved this problem or has idea? Thanks.

http://www.netgen.hr/eng

Ɓukasz Serwatka

Wednesday 04 May 2005 12:08:45 am

Hi Vjeran,

To solve it you will have to modify links in google.tpl template. Your links should be like

After ?/hr/content/search/(offset)/10 set & sign

/index.php?/hr/content/search/(offset)/10&SearchText=bla

Stanard google.tpl file is in design/standard/templates/navigator/

There is $page_uri_suffix in google.tpl which returns ?SearchText=bla If you don`t want hack the kernel, you can replace ? with & using string functions (more in doc).

I hope it will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Vjeran Vlahovic

Wednesday 04 May 2005 1:20:41 pm

Thanks a lot, Lukasz :)

Here's what I did, somebody can find it usefull:
I've replaced original page_uri_suffix with the new one page_uri_suffix_cgi in google.tpl:

{let page_uri_suffix_cgi=concat("&",$page_uri_suffix|extract_right( $page_uri_suffix|count_chars|dec( 1 ) ) )}

http://www.netgen.hr/eng