Search code examples
phpmysqlrssmodx

modx evolution external database


I have 3 seperate modx evolution website. All 3 websites are completely different and therefore run off a seperate database. However for the news and events pages of each website i would like them to all run from the database of the 1 of the 3 websites. I this possible? is there an extra already created for this purpose?

I have looked into the possibility of using an RSS feed, but would rather have them running directly from the database as this would allow a news article to be added from any of the 3 websites.

Thanks, Sean.


Solution

  • you can create your extra tables in one modx instance & access them externally ~ however they will need to be on the same file system. I am not aware of a method to do this VIA http/API etc. See here.

    http://rtfm.modx.com/display/revolution20/Loading+MODx+Externally

    What you will want to do is create your extra table and extend modx using xPDO, it's a fair bit of work to get setup initially but worth it in the long run. This is the best example for getting started, although you will not be extending anything [but modx] it does give you useful examples of creating your schema and registering it with modx.

    http://rtfm.modx.com/display/revolution20/Extending+modUser

    and

    http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components

    Finally, there IS an extra that will generate all your schema files for you, however I can't seem to find what it is called... sorry. If you have multiple tables using foreign keys it may not be all that useful to you as it won't create the relationships in the files it generates.