Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

GOOD Themes Search JS integration


I bought it and I am working on it.
Even after reading the docs, it's not really clear how to integrate the search.
I would have expected something like when the user types "enough" characters as specified in the *data-kt-search-min-length* there would be a callback or something so that I could let's say ajax-call my PHP to fill the data from the DB, but I don't really understand how your method/events interact with the JS.
In the end, I think I will only use the CSS classes and I will re-implement it from scratch, it will probably be faster, but it would be nice to have in the docs an example on "how" connect it with a PHP script to read data from a DB.
Again, I can do it - as always - all by myself, not a problem, but for example...
I wish I had a callback for example search.yourSearchString(s) to be called with 's' being the search string, and I can ajax-call a PHP to get back some data, even already formatted, and update the div containing the result.
But I am sure it's already "done" somewhat, I simply don't understand how/where.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

Sorry for the late reply.

The search plugin's initialization code you can check here:
src/js/layout/search.js

You can use processsAjax function to process and show the search results.

However, our search example is used for demo purposes only and every project has its own search requirements so the UI part of the search can be used with any custom search logic.

In the future, we will consider a more unified search component with detailed documentation. Appreciate your feedback on this.

if we can help with anything else please do let us know.

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(