Custom advanced search

Author Message

Albe Terra

Tuesday 02 September 2008 4:03:47 am

Hi!
I need a custom search form, and I want to use silently the eZ Advanced Search.

The goal is to have a form in a node (defined with a custom .tpl). After the search, I want to remain in the same node where I'll have the form and under the form the results of the search.

The problems is that the advanced search moves me to a different path (obviously, since the Form action is "content/advancedsearch"), so I loose the context in the tree navigation. I'm not in the same node.

How can I solve the problem?

Thanks in advance, bye!

Ivo Lukac

Tuesday 02 September 2008 8:21:29 am

Hello Albe,

You can take the code from the advancedsearch.tpl with fetch(content,search,...) function and place it in your custom tpl. So you don't do the content/advancedsearch action but call the same page with search values in view_parameters.

If your form is in content part of site then you need to disable the view cache in that custom template to make this work.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.