I have two sites build with Modx1.04, both of them were about tourist but diffent area.
Now I want add the same content to one site from another site, can I just import the database?
Does you guys have the experience or have some adivce?
Thanks very much!
-
☆ A M B ☆
- 24,524 Posts
No, you can't just import the database, as that will cause conflicts with the resource and element IDs; both sites probably have a resource with ID #1, for example.
Another complication is that TVs are connected to resources by their ID; so if you have a resource #10 with a TV in site B, and insert that resource into site A with a new ID since it can't have the ID of 10, its TV won't know what it is.
So I am not aware of any simple way to do this.
-
☆ A M B ☆
- 24,524 Posts
If you have a lot of resource, hundreds for example, it might be worth your while to write a custom script to fetch the resources from site A, then process them one-at-a-time to insert them into site B's site_content table, get the insert ID (the auto-increment ID) then identify its TVs, fetch its TV value from the site_tmplvar_contentvalues, identify the corresponding TV on site B and insert the IDs and value into site B's site_templvar_contentvalues table.
Then if your pages are private, you have group assignments to consider. That would also have to be part of the resource-transfer script; much in the same manner as the TV values.
A bit tedious to set up, but it's do-able.