2

I need to copy a page to another segment in a site both in MSM on 1.6.8. I was just calling the

site="first-site"
from the second site template and using the info that way. The problem is that the markets have now separated direction. They want the same "page" only with different content and style. (lol)

There are a lot of fields and I would like to just copy the field group and possible the entry over to the other site being that the entry options will remain the same.

Any ideas? Besides just database manipulation...

Thanks guys.

1

MSM offers you the option to copy or move over field groups and content when you first create a new site if memory serves, but that is a one time offer, which it seems like it is unlikely to help you now, EXCEPT:

If you dig into the MSM code that handles that part of things it would make it a lot easier for you to work out the queries that you'd need to do it directly in the database.

Here is a starting point:

In cp.sites.php is a function called new_site_form, in that function is a section demarcated by a comment:

/**  New Site?  Allow Moving/Copying of Existing Data

That has the code that does the interface providing those options

in the function update_site is a comment:

/**  Moving of Data?

That appears to be the logic that actually moves the stuff.

I'm short on time so that's as far as I can take it, but hopefully it gives you a boost.

| improve this answer | |
  • Yeah... The sites are already created and entangled.... I ended up copying the db out and re-upping the DB to a single site (new requirement added), then pulling everything out that ws with site_id of the other sites, changing the site_id of the site needed, and running with it that way. As for the fields, I kept the fields needed from the original site and changed the site_id number to match the new config and all sub tables related. No fun!!! :( – W3bGuy Jan 9 '13 at 18:03
  • I'm glad you got it worked out. It may be a good idea to write this up as an answer in greater detail. – UltraBob Jan 9 '13 at 23:07
  • I will when I get caught up a bit.... I just got landslid. ;) – W3bGuy Jan 10 '13 at 19:03
0

Doesn't MSM offer to duplicate templates and field groups for you when you create a new site? I think this was true under the 1.6.8 version as well as now. I just can't recall. But you can always test it under a test site. That way, you'll have should end up with everything you need, then just adjust the templates as needed.

| improve this answer | |
0

The question was answered in the comments above...

I ended up copying the db out and re-upping the DB to a single site (new requirement added), then pulling everything out that ws with site_id of the other sites, changing the site_id of the site needed, and running with it that way. As for the fields, I kept the fields needed from the original site and changed the site_id number to match the new config and all sub tables related.

I will write this up when I get some time. (still buried)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.