Forums Forums Search & Filter Pro Results Page – Can tag URLs evoke Ajax load/refresh of page results?

Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #251386

    Hi Guys.

    I have s Search Filter form where I am displaying posts in a list.
    Ajax is enabled.

    I am listing tags with Search Filter URLs prepended within each post that’s listed.
    eg: /?_sft_tag_technologies=health

    Is it possible to have the tags hook into the Ajax refreshing of results?

    Will send URL to demo site privately.

    Anonymous
    #251387
    This reply has been marked as private.
    Anonymous
    #251429
    This reply has been marked as private.
    Trevor
    #251499

    Sorry, I would have gotten to your thread earlier, but by bumping it you placed it further down my list (I work oldest last touched first). Your first two posts arrived here while we were closed for the weekend.

    You want the tag term names listed in the posts themselves to be able to trigger the Ajax of our form? I am sorry, but I do not think that is possible directly. I think the links would have to send to a custom javascript that would then receive the tag name, set that in our form and then trigger a submit of the form.

    Anonymous
    #251609

    Apologies for that.

    Is there not a hook or something we can tap into to use/build upon the ajax?

    In others a way to mimic what the filters are doing?

    Trevor
    #251664
    This reply has been marked as private.
    Ross Moderator
    #251675

    Hi Trent

    I’m having a little trouble following your question:

    I am listing tags with Search Filter URLs prepended within each post that’s listed.
    eg: /?_sft_tag_technologies=health

    Can you be more specific? I don’t see any links on that page just a search form + results?

    Thanks

    Anonymous
    #251736
    This reply has been marked as private.
    Ross Moderator
    #251744

    Hi Trent

    Thanks for the video, makes perfect sense.

    Right now there is no easy way to do this, we have a very limited JavaScript API… but it will be good to add support for this, so tagging it for version 3…

    You could achieve what you wanted though, but through a fair a bit of custom JavaScript.

    The logic would be:

    1) Leave your URLs exactly as they are, they will be good for SEO, and proper links through to the results in the event JS doesn’t work
    2) using JS, hook into the onclick of your category links
    3) grab the value directly from the href of your anchor tag, or add a data-attribute with the category value only (so you don’t have to parse the string)
    4) set the value of your category field to the new value, radios are annoying to set, but you can do like this example
    5) then submit our form – $('.searchandfilter').submit() – if ajax is enabled, the submit will be an ajax request.

    I’m afraid its a bit cumbersome right now, a proper JS API will be coming.

    Thanks

    Anonymous
    #252131

    Thanks for your response, we will have a go at implementing something like this.

Viewing 10 posts - 1 through 10 (of 10 total)