Centeralized News Source

6 posts by 3 authors in: Forums > CMS Builder
Last Post: March 4, 2014   (RSS)

By Ryan - February 25, 2014

Hi All,

I've four websites (Website A,B,C & D) all using CMS Builder.

Site A is the parent site and it's the only one with a news editor in the CMS.

My question is, is it possible to display news from website A on the other 3 websites.

It seems like the news page on website B, C and D would need two connections one for it's own CMS and one for Website A.

I could use an iframe, but was looking for something a bit cleaner.

Has anyone any ideas on this?

By Chris - February 25, 2014

How about fetching a news page from Website A and injecting its HTML straight into your pages on Websites B, C, and D?

<?php echo file_get_contents('http://websiteA.com/news_include.php'); ?>

Hope this helps!

All the best,
Chris

By Ryan - February 26, 2014

Hi Chris, thanks but I would like to be able to alter the where statement on each site locally. Really I need to connect to two databases at the same time on certain pages.

By Chris - February 26, 2014

> I would like to be able to alter the where statement on each site locally.

Another option would be to use three separate includes on website A:

On website B:

<?php echo file_get_contents('http://websiteA.com/news_include_B.php'); ?>

On website C:

<?php echo file_get_contents('http://websiteA.com/news_include_C.php'); ?>

On website D:

<?php echo file_get_contents('http://websiteA.com/news_include_D.php'); ?>

All the best,
Chris

By Ryan - March 4, 2014

Thanks Chris / Greg, In the end I set up a new SQL connection manually and pulled the record across from the parent website.