victorjonsson / Arlima

Article List Manager - Wordpress plugin suitable for online newspapers that's in need of a fully customizable front page
28 stars 16 forks source link

List as JSON #10

Closed mrojas closed 11 years ago

mrojas commented 11 years ago

Hello, Wonderful plugin, we are using it in www.centediario.com. I would like to know if there is a way to render an article list as JSON, to be consumed from an iOS/Android client. Ideally it would contain the thumbnail URL, article title, excerpt and link to the full article.

Thanks!

victorjonsson commented 11 years ago

First off you should update to the latest version of Arlima. Then you navigate to "List Manager" -> "Settings" in wp-admin. There you will see a meta box labeled "Export" where you choose which lists that should be available for export. Let me know how it works for you!

mrojas commented 11 years ago

Thanks Victor. I have upgraded and selected a few lists for export. But how do I retrieve them? how should the URL look like?

victorjonsson commented 11 years ago

Are you using short codes when inserting the lists on your site? The list that you want to enable for export has to be related to a page using the meta box labeled "Arlima" on the same page as you edit pages. A list that only is inserted using a short code will not be possible to export.

The URL of the exported list will be displayed when you've marked the checkbox for the list that you want to enable for export and pressed the save button.

mrojas commented 11 years ago

Hi Victor, I am rendering the list on PHP: <?php arlima_render_list( 'main' ) ?> so I believe this is the cause I won't be able to export them in JSON format.

victorjonsson commented 11 years ago

Okey, then all you have to do is to create a wordpress page and relate the list "main" to that page. If you call the page for example "Main arlima list" you Will be able to access it at the URL /main-arlima-list/arlima-export/ (the export URL Will also be displayed on the settings page)

mrojas commented 11 years ago

Awesome, that worked :)