Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
I have two different CouchCMS instances on the same server with different connection strings. I have to pull the news from one site to the other. What is the best approach for this?
The best approach is the one you can pull off :) It is in the field of very custom solutions so perhaps it is a good idea to pay KK for this consultation. Let me give you a hint to a completely functional approach: borrow global $DB object to trick the fetching tag, do the fetch then roll back the change. The code is only a couple of lines, so perhaps could be even wrapped into a new tag-pair, named something plain like <cms:connect> which would execute inner tags with the configured instance's connection.
I think using REST API would be a good option -
viewtopic.php?f=8&t=13412
KK wrote: I think using REST API would be a good option -
viewtopic.php?f=8&t=13412


A very good option if that worked :?

Thanks for bringing up this api thing, Couch definitely needs something like that for advanced users, but for a total of 1000+ lines of code in that repository one must have time to go through it all to even understand how that works. I found and reported a loong time ago a code issue (not using <cms:escape_json> which breaks JSON if quotes appear in values) but apparently @mwlarkin does not update that api anymore. Any news on next Couch update, KK? Rumours :)
I plan to create a simple syndication page, where the data can be pulled in json format.
5 posts Page 1 of 1
cron