Forum Discussion
- AdamNKhoros Oracle
Hi Allen,
This is definitely possible with the right combination of REST API calls and freemarker code. Check out this tutorial written by DougS:
http://lithosphere.lithium.com/t5/Lithium-Developers/Latest-3-blog-articles-Freemarker/m-p/23884
- Adam,
Its a good tutorial but its talking about putting the blogs in the community.. we want to surface them outside the community on a different domain. AFAIK freemarker doesnt work outside lithium.
Thanks
Allen- AdamNKhoros Oracle
Ah, my apologies for the misunderstanding. I thought you were talking about the front page of the community. The REST API call used in the linked example would still be relevant, but the rest of the approach would definitely be different for syndicating the content externally.
One thing that may be particularly helpful, is to get the data back from the REST API call as a JSON object. This is possible by adding the following query string to your call:
xslt=json.xsl
Here are some other query string parameters that may be helpful as you're pulling the data:
Here's another related post about working with JSON objects via jQuery:
This example was intended to be used in a Lithium community as well, but the jQuery you see in there would still be relevant to working with our REST API externally:
Alternately, you could take a look at the source code for the related activecast module. It uses our REST API as well, so the code should give you some ideas about how to work with the data. Or as you look through the code, you may even find areas that you could tweak to acheive your desired result.
I hope these resources help!
Related Content
- 10 years ago
- 7 years ago
- 10 years ago