API controlled Slider (D)

If you want to run a Slider on your Website and control the content like images and text via an API you can do that in this way:

  1. The PRO-Version of the WordPress-Plugin SmartSlider 3 can use RSS-Feeds as Contentsource.

    So you need an RSS-feed to feed the Slider-Plugin.

    If the API gives you RSS everything is ok. But those APIs are rare.
  2. Create an RSS-feed out of JSON via the PRO-version of the JCI-plugin:
    Create a Template in the JCI-TemplateManager with the following code. This is just static rss.

    <?xml version="1.0" encoding="windows-1252"?>
    <rss version="2.0">
        <copyright>Copyright 20...</copyright>
        <lastBuildDate>Tue, 21 Oct 2019 03:19:24 -0800</lastBuildDate>
        <pubDate>Tue, 21 Oct 2019 12:18:22 -0300</pubDate>
          <pubDate>Tue, 21 Oct 2019 07:38:46 -0800</pubDate>
  3. To achieve this, build a JCI-Shortcode like [jsoncontentimporterpro url=http://….id=NUMBER_OF_ABOVE_TEMPLATE debugmode=10]
    You might have to add authentication-info or similar data.
    Publish the page and view it in ther browser. The browser should show you the debug-infos of the plugin and in the best case the RSS-code.
    Then remove “debugmode=10” from the shortcode and publish the page again.
    Add “?show=oc” to the browser. This should remove the template header, footer etc. and gives you the pure RSS-feed.
  4. If the previous step gave you RSS you now can edit the template and insert the JSON-data. In the end you get a RSS-feed out of JSON.
    Notice: RSS is sensitive to speacial chars and chars used for RSS itself. Therefore consider to mask JSON-data in a CDATA-tag.

  5. The resulting RSS-feed can be used with the SmartSlider 3 RSS-connector.