Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(