Reputation: 1
Currently we are using DNN to implement and manage our company websites. Therefore we own several websites and one 'head'-website. Each of the sites contains its own DNN installation. For creating news we are using the 2sxc module.
Now we have the following tasks: If a user creates new news in one of the websites, we want to export them automatically to
So is there any opportunity, e.g. an API or another module to realize that?
Thank you very much for your answer in advance!
Upvotes: 0
Views: 78
Reputation: 5638
2sxc has everything you need :)
Your best bet is probably the REST API to access the items (see https://docs.2sxc.org/how-to/webapi/webapis.html and https://2sxc.org/en/learn/rest-for-javascript). Just activate some permissions and you can get them from anywhere. Here's a basic recipe to configure the permissions: https://azing.org/2sxc/r/k0YbVYXO
You can also create queries (like to only give the the last 5) and set permissions on that, using https://azing.org/2sxc/r/BE0HbDwA.
This blog post may also help you: https://2sxc.org/en/blog/post/releasing-2sxc-8-10-public-rest-api-visual-query-and-webapi-shuffle-datasource
Upvotes: 0
Reputation: 1264
I would consider doing this another way.
Create a new installation or site in which you create and store all news items. Add an RSS feed or a webapi to this site, and create methods such that other sites can grab news items from this site.
Modify your other sites to use the webapi (or RSS feed) from the news source for their displays. This should be quite easy for the sites that use 2sxc. You'll just need to change the data source to get data from the webapi or RSS feed.
This will eliminate issues of duplicating data, etc.
If you want to reduce development, you could get a copy of DNN Sharp's API Endpoint module(https://www.dnnsharp.com/dnn/modules/custom-dnn-api-endpoint). They have pretty good documentation, and YouTube videos to walk you through the creating of endpoints.
Upvotes: 1