• Resolved gooroo666

    (@gooroo666)


    Hello,

    I want to add a button in my autocomplete.php file, wich is a link to the search page. A link to an URL like mywebsite/?s=x

    So I tried to modify the autocomplete.php template, but I need to add the variable of search value input, in order to create a link like : mywebsite/?s=$variable. How can I find this variable ?

    Thank you.

    G.

    • This topic was modified 1 year, 6 months ago by gooroo666.
    • This topic was modified 1 year, 6 months ago by gooroo666.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Without knowing exactly how your templates are, outside of what I see with the provided link, not quite possible for me to perfectly know.

    That said, based on the view source of that link, you are still using the version of Autocomplete that ships with the plugin out of box. That file thankfully also has an “empty results” script block, where it shows usage of {{ data.query }} which SHOULD render the query’d string for you.

    I say the first part because I know I checked on some code that I worked on for a client who was using updated Autocomplete. We added a link like that but this client’s template was more ${item.query} for accessing the string.

    Thread Starter gooroo666

    (@gooroo666)

    Thank You Michael. I will try that ! ??

    Bests,

    g

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Let us know how it goes. Going to close the thread as resolved for the time being. We can return if needed.

    spyros

    (@spyrosntanos)

    Hello,

    So, @gooroo666 did you manage to add that button to autocomplete.php and how, because I want it also .

    Thanks!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I know I have some variations of that with the templating structure and whatnot for Autocomplete 1.x versions, but nothing for what’s still the default with the plugin (v0.38), as we still haven’t fully fleshed out how to upgrade people without breaking things. We need to renew efforts on that front in 2024 as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘autocomplete > search all button’ is closed to new replies.