by
KK » Tue Jul 04, 2017 3:42 pm
Hi

I am sorry but it was not clear (to me) from your question as to exactly how you'd like to utilize the data you have in the database.
Is it that -
1. You only need to display the data on a Couch managed template? or
2. You need to use the data to actually create cloned-pages in Couch (which then, of course, can be displayed as per usual).
If the answer is '1', you have the following options -
a. You can use <cms:php> tags in your Couch template to execute raw PHP. You can formulate SQL queries in PHP the regular way, fetch the data and display it through PHP.
b. this extends point 'a' above - After fetching the data using PHP, you can set it in Couch's context as PHP array. Then anywhere in the template you can simply use Couch's <cms:each> tag to loop through that array and show the data. For this please see
viewtopic.php?f=5&t=10892c. If the data that you have resides in the same database as your Couch installation, then instead of PHP you can use Couch's <cms:query> tag to fetch and show the data. Please see
viewtopic.php?f=5&t=7377 (find the "2. Executing custom SQL queries." section in that post).
If the answer is '2', then you can import that data into Couch to create cloned pages. You may modify the 'CSV importer' we have to do so -
viewtopic.php?f=5&t=8803Finally, if the answer is none of the two, please let me know in more detail about your use-case.
Hope the reply helps.