Hi,
I am working on a project with multiple sites on one ModX (2.2.6) installation split across several contexts. The main context (the main hub site) will have a collection of news articles (using the Articles package) and ideally I would like to be able to use these articles to provide the news for the sites in the other contexts, filtered depending on the articles tags. Clicking on an article on one of the secondary sites should then load up the article on its domain.
Currently it is correctly listing the articles based on their tags, however on the sub site when you click on an article there is a "Page not found" error.
So to help illustrate (at least I hope it helps illustrate >,<)...
There is hubsite.com
This is the main site which should provide all the articles.
So on this site an article would be hubsite.com/news-and-media/latest-news/2013/01/08/sample-article/
There is secondarysite.com
This should be able to list and view the articles from hubsite.com on its own domain.
So the same article would now be on secondarysite.com/news-and-media/latest-news/2013/01/08/sample-article/
Hope this is possible.
Let me know if you need further clarification.
Thanks
Hi,
How did you get the tags to show up in the first place in the other top level domain (...Context). What's your call?
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Although the Articles resources are not physical files, they are nonetheless bound to a specific front-end context, which context, in your case, is bound to a specific top level domain, http_host etc. I doubt if resources can make the switch from, say, hubsite.com/news-and-media/latest-news/2013/01/08/sample-article/ to secondary.com/news-and-media/latest-news/2013/01/08/sample-article/ .
Some people have used duplicated resources between contexts, or if possible, have used symlinks. Symlinks are more efficient. Two 'resources,' one content! Unless you tweak the Articles core, though, good luck finding a way to create a symlink for its resources.
The tags are pointing to 404 because the link reference in the tag tpl is not absolutely absolute. It thinks you are still in the hubsite. You may alter the tpl and make them point to your original hubsite articles, but then that'll defeat the point of cross context articles.
Please do share your solution.
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Just thinking out of the box here. A very "hacky" approach would be to copy the resources in the backend DB through SQL queries like export the relevant DB entries and import them into the appropriate tables on your subsite through a cron job on each site. I know this isn't "in the spirit of the CMS", but if you can wait a bit for the cron job to run periodically, it should work. Might create some caching issues though which I will leave to the gurus to answer <.< >.>
I'm also interested in how it works out. GL
-
☆ A M B ☆
- 24,524 Posts
Articles posts are resources like any other. They can be accessed directly via their resource IDs. The trick is to find their IDs. As far as I know, their IDs are not displayed anywhere in Articles. A MIGXdb-based CMP or TV might be useful here, as you do know the ID of the parent Articles resource.
http://rtfm.modx.com/display/ADDON/MIGXdb.Tutorials