Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Hey there,

Let's consider the following root :
Image

Is there a way to take all the articles in the first website and display them in the second website and the other way around?

This comes in handy when a company has two locations and wants two separate websites for each location cause they have different colors, prices and so on but have the exact same articles.

If one location adds/updates an article it would be nice to show them in both websites.
No direct way of doing this, I'm afraid, as the two websites are isolated from each other as far as Couch is concerned.

However, indirectly you can always use JS (via AJAX e.g.) to make a cross-site calls and then display the data thus fetched.

As an example, you can create a Couch managed template in site B that uses <cms:pages>tag to return pages from the site. You can, if you wish, make it set the cms:pages limit, offset and other parameters by taking values for the querystring used in the URL of the template while calling it.

Now from site A, you may invoke the template mentioned above and then display the results returned by site B on the calling site. Same procedure can be implemented in reverse.

Hope this helps.
Let me spill something here.
It all depends on circumstances. You can simply share a database, so each will read and write to the same db.
I would do one installation though. Different data can always be set up as editables. Don't you think so?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Something simular...

Im wondering if the following would be possible:

Main system with own couch and own DB

Client system with own couch and own DB - Client 1
Client system with own couch and own DB - Client 2
Client system with own couch and own DB - Client 3
Client system with own couch and own DB - Client 4

Fetch data from users/index.php file in client 1, client 2, client 3 and client 4 and display on page like Client list in Main system.

All systems and DB runs on same server. But i think i must use a solution like this since all my clients wants custom design and functions but i want a Cataloge and list all my Clients there.

i hope i explain good and i hope this is something that would be possible! Awaiting some tips about this :)
Kim, sometimes it is easier to upload a list of clients and their users via CSV import. Some script can save data to a file on demand from each couch installation.

Another way is to connect to all databases one by one and read data from users table. This can be done with some php.

If something can be done the easy and simple way, then we should evaluate complexity of synchronization against some data on-demand. Do you intend to have this data updated more often than once a week?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
I think ones a week would be good. Then i can make cron job to just make an update and run the csv file to MAIN system from all the Client systems.

What do think about that solution Trendoman?
Pretty quickly found this solution to connect to databases in php
viewtopic.php?f=2&t=10098&p=23838&hilit=database#p23839

This can be used to connect to all of them and read all pages from a certain template id. The idea is to make a php script, learn something new in the process and get a solution without cron jobs and intermediate csv dumps.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
7 posts Page 1 of 1