I want to replace a completely hardcoded website that uses some PHP with one built with MODx. On the old site I have some pages showing products that include data retracted from an external MySQL database, the data depend on which page and thus which group of products is chosen.
Each page with a table is a PHP script that has several criteria hardcoded as variables (in fact they are all in one array). A page call includes a PHP script that contacts the database, constructs the query from some default values plus the values of the called page to get the appropriate data from the database. The delivered data then are formatted into tables and shown to the customer.
I managed to get the connection to the database working, but I’m missing something. What would be the best way to attach said criteria to a document in MODx? Would there be a way using template variables?
Hans
Thanks, I got it working.