copy pages between sites in mojo

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
6/2/2011 12:31:05 PM
Gravatar
Total Posts 14

copy pages between sites in mojo

Hello,

We are trying to use Mojo Portal for our project and facing one problem I could not find an answer to in the documentation so far. Maybe someone had to tackle the same issue before and could suggest a workaround for it. Basically, we are creating a separate site for each branch in our company, but a lot of pages will have the same (at list initially when a new branch is created) content. So, we were looking for an easy way to copy pages from one site to another. I know you could publish the same content on multiple pages in Content Manager, but it would work only within the same site. So, the question is is there a way to do it across sites in the Portal? Any suggestions would be great!

Thanks

6/2/2011 12:46:59 PM
Gravatar
Total Posts 18439

Re: copy pages between sites in mojo

Hi,

There is no way to copy pages from one site to another in mojoPortal other than manual copy paste.

However there is a system that you can use to define the initial content that populates a new site so that whenever new sites are created they have pages and content that you want already created and populated.

I do this for our demo site, where basically the site is re-created periodically to clean up from people trying out the demo, and each time the site is re-created it gets the same content as before.

See the documents Configuring Initial Content and Populating Feature Content.

Hope that helps,

Joe

6/7/2011 3:50:01 PM
Gravatar
Total Posts 14

Re: copy pages between sites in mojo

Hi Joe,

Thanks a lot for the prompt reply. I looked at the documents you suggested and I see that we could define pages/subpages with some settings in the configuration file and they will be created when the new site is created. But, I still do not have a full picture on how we could populate an actual content on those pages. I see the reference to contentTemplate="InitialSiteHomeContent.config" in you document, but there is no example of this file. You also reference your demo site, is there a way to download source for it to see your setup config files and how is content on pages is created?

Thanks

6/8/2011 6:13:06 AM
Gravatar
Total Posts 18439

Re: copy pages between sites in mojo

Hi,

I've updated the article with a link to a zip file with a more complete example (the actual files I use to create the demo site content).

I commented out some things such as the page configurations referring to my paid products. I also left out all the gallery images, webstore product files etc to keep the download small, but it shoudl provide a good example to study and give you the idea of how to configure your own content.

Hope that helps,

Joe

11/4/2011 6:20:15 AM
Gravatar
Total Posts 41

Re: copy pages between sites in mojo

Hi Joe,

I see from this thread there is no way within MojoPortal to move pages between sites within a portal installation.  That's fine, but it must surely be possible to devise a db script that will do this (I realise one would also have to move image files etc. within the file system, but that's pretty trivial if you have server access).

I tried just changing the siteID of a page within my portal from one site to another but this did not work - in fact it had disappeared from the original site even after I put the siteID back to its original value.  I now see that page modules have a siteID as well, so I guess there's more to it.

Could you give me a few pointers as to what would be required of a db script to move pages from one site to another?  The reason I need to do this is because I need to move a site to the root of my portal so that I can have another site in the portal exist within a folder name of the root site.

Thanks,

 

Michael

 

11/4/2011 7:32:02 AM
Gravatar
Total Posts 18439

Re: copy pages between sites in mojo

All parts of the content are tied to the siteid and siteguid. It is theoretically possible to move content from one site to another in the db by updating the siteid and siteguid on mp_Pages, mp_Modules but understand that the site map is cached so changes in the db aren't reflected in the menu until you clear the cache by recycle the app pool or touch web.config

be careful that you also adjust parentid and parentguid in mp_Pages so that the parent is not form a different site. Possibly other things also would need changing but those are the main things. roles might be different between sites so pages may end up with incorrect roles. userid and or userguid may be attached to the data and may be invalid if you change the site, etc.

I would generally recommend avoid doing this change and move the content by copy paste or re-creating it in the other site. You can try doing it in the db but you may miss something and your mileage may vary.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.