Pulling in Information from 2 different CMSB installations into the same page

7 posts by 3 authors in: Forums > CMS Builder
Last Post: October 12, 2012   (RSS)

By gadefgaertgqe - October 11, 2012 - edited: October 11, 2012

Hi,

I am in a situation where I am pulling in information from 2 different CMSB installations into one page.

The first LOAD RECORDS works fine and all information is there.

However the second CMSB LOAD RECORDS fails. I am pulling in the information as a PHP include (it's the footer of the page).

I get no errors. But looking at the page source in the browser it seems like the server simply stops at the point I call the include with the info for the second CMSB.

Any suggestions?

Thanks

Paul

Re: [8bit Pixel] Pulling in Information from 2 different CMSB installations into the same page

Hi,

Are these two installations on the same hosting or server? CMS Builder wasn't designed to have more than one instance running on the same page. We've not tried doing this before, so I'm not sure if it is possible as when you include the viewer functions from the second CMS Builder a lot of functions and settings from the first could be overwritten or clash with the second.

I think the best way to do this might be to use Ajax to load the content from the second CMS Builder and place it on the page that way.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Pulling in Information from 2 different CMSB installations into the same page

By gadefgaertgqe - October 11, 2012 - edited: October 11, 2012

Hi Greg,

Yes, both installations are on the same server. One pulls in product information from a nightly upload. The other provides the content for the rest of the site.

Would something like this maybe work?
http://api.jquery.com/jQuery.get/
http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/

Thanks

Paul

Re: [8bit Pixel] Pulling in Information from 2 different CMSB installations into the same page

Hi Paul.

Jquery get does seem the way to go, I would use something like this:

<script type="text/javascript">
$.get('path/to/data/page.php', function(data) {
$('#content-div').html(data);
});
</script>


<div id="content-div" >
<!-- content will be loaded into here -->
</div>


Thanks
Greg Thomas







PHP Programmer - interactivetools.com

Re: [Toledoh] Pulling in Information from 2 different CMSB installations into the same page

@Greg: Will give that a go in a moment . . . . after coffee ;)

@ Toledoh: No problem explaining. They are split due to the amount of data that is imported each day into one of them. It imports a CSV and ZIP full of images. As a result it's just quicker to wipe the database and import.

With that kind of stuff going on I felt it best to split them. Also when it comes to backups, I will not be backing up data that is redundant by the next day, and so on....... the list of reasons is fairly extensive lol!

Re: [8bit Pixel] Pulling in Information from 2 different CMSB installations into the same page

By gadefgaertgqe - October 12, 2012 - edited: October 12, 2012

@ Greg: All working! Slows things down just a little but it's by far the best solution I could have hoped for! Thanks for looking at it :)

I would love to see the ability for CMSB to be able to work with multiple copies of itself in the future.

As always CMSB, the support and the community rocks!

Paul