ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Searching entries via dynamic parameters

November 17, 2010 7:58pm

Subscribe [6]
  • #1 / Nov 17, 2010 7:58pm

    tinyv

    11 posts

    Hi

    I’ve got a POST form using the appropriate field names to query a particular weblog against certain custom fields using the {exp:weblog:entries} dynamic_parameters parameter, for example:

    {exp:weblog:entries weblog="publications" dynamic_parameters="search:publication-title|search:publication-author|search:publication-reviewer|search:publication-year|category"}

    The only issue I have with this is how do I then paginate results as you would using the {exp:Search} module?

    Requiring a POST form it is not possible to carry search queries then over multiple pages.
    Have found it possible to implement a client-sided solution (eg using Javascript to break the results into more digestible chunks and artificially paginate results) but this isn’t perfect.

    Anyone got any suggestions or thoughts on how best to achieve this?

    Cheers

    Cole

    EE details:
    ExpressionEngine 1.6.9
    Build:  20100430

  • #2 / Nov 17, 2010 8:20pm

    Wouter Vervloet

    758 posts

    Hi Cole,

    You could use some PHP and save the search terms in a cookie. You would keep the search terms as long as they haven’t reset the search.

    I believe Solspace’s Super Search module solves this by generating a has and appending it to the url that it uses to save the terms or even the resultset on the server side (for caching purposes).

    Greetz,
    Wouter

  • #3 / Nov 18, 2010 7:50am

    leeaston

    634 posts

  • #4 / Nov 18, 2010 3:48pm

    Ingmar

    29245 posts

    Thanks for the assist, guys. Does that make sense, tinyv?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases