Search Page tutorial

Hi,

I am new to the Squiz Matrix CMS and need to create a Search page to query a database and show results. I read the manual but can quite get how to query the DB straight without creating searchable assets. Specifically I need to know how to configure the search button such that it queries the DB. Please help.    

Have you looked into using the DB Data Source asset? It can be used to query a Database and you can use dynamic inputs which should allow you to search.

 

http://manuals.matrix.squizsuite.net/data/chapters/db-data-source

Have you looked into using the DB Data Source asset? It can be used to query a Database and you can use dynamic inputs which should allow you to search.

 

http://manuals.matrix.squizsuite.net/data/chapters/db-data-source

 

Thanks,

 

I will give ths a try.

Would anybody have a piece of code on how to set up the Search Page which queries a database? I read the links suggested and could really use a quick tutorial or example. I want a simple search page code and just think it would be quicker if somebody else has something similar or jus an example. Thanks for your help Nic.

Here is a video of how to setup a search page:

 

http://matrixusers.com/tutorials/search

http://matrixusers.com/tips/build-your-own-search

Would anybody have a piece of code on how to set up the Search Page which queries a database? I read the links suggested and could really use a quick tutorial or example. I want a simple search page code and just think it would be quicker if somebody else has something similar or jus an example. Thanks for your help Nic.

 

I think we need to clear up exactly what you want. First you said you needed to query a database, and then you said you wanted a search page.

 

If you need to query an external database, or anything that is not in Matrix, you will need to use the DB Date Source asset that I mentioned above.

 

If you are wanting to search within Matrix then that is a more simple setup. :)

I have done a bit more reading and think the DB Data Source is a good place to start.

I am actually adding a search page that queries an external DB.

I thought there would be some code out there that I could quickly customize and use but I will continue with reading and will yell out if I get stuck.

Thanks all.