Twig-template engine (PRO plugin)

The free Version of the JSON Content Importer-Plugin is based on the proprietary “JCI-parser” with some great features. This is good and still available.

But: If you want to have full control of your JSON, build applications etc. you need a better parser. For this the pro-plugin comes with the popular Twig-engine (

The usage is as following:
After getting access to the JSON-data the PRO plugin can suggest you twig-code for displaying all the JSON-data.
For that create a template with the URL and maybe needed accessdata so that JSON is available. Leave the template empty and switch on the debugmode.
Preview the page and see the twig-code generated.

How to use Twig:
You can use Twig-code just the way as with jci-template-code in the free plugin (ok, but not recommended: use the PRO plugin-template, see below)

[jsoncontentimporterpro url=http://... parser=twig]
{% for eventitem in event %}
{% if eventitem.evs3|length > 0 %}
{% endif %}
{% endfor %}

The better way is to use Twig via the PRO plugin-templates:.

In short: Twig code is in the PRO plugin-template with Number NO. Then the Shortcode is as simple like this:

[jsoncontentimporterpro id=NO]


Sometimes the devil is in the detail:

Twig has many powerful commands, but sometimes more is needed. Therefore in the PRO plugin several additional Twig-extensions are added:

Especially if you want to merge several JSON-Feeds to one JSON-Feed “doshortcode” and “json_decode” are helpful: By “doshortcode” you can execute other JSONContentImporter-Shortcodes which give JSON and “json_decode_4twig” or “json_decode” tranforms the Shortcode-Strings to twig-arrays which can be merged into one twig-array: