API-Source:
https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php
and
https://www.stadt-koeln.de/leben-in-koeln/verkehr/verkehrskalender/
JSON stored locally: https://api.json-content-importer.com/extra/json/koeln-20220130-traffic.json
In Action:
Free Plugin (show the first four items)
[[jsoncontentimporter url=https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php]STRASSE:AUSLASTUNG {subloop-array:features:4}{subloop:features.attributes:-1}{NAME}: {AUSLASTUNG} {/subloop:features.attributes}{/subloop-array:features} [/jsoncontentimporter]]effff
jsoncontentimporter url=http://www.stadt-koeln.de/externe-dienste/open-data/traffic.php]STRASSE:AUSLASTUNG
{subloop-array:features:4}{subloop:features.attributes:-1}{NAME}: {AUSLASTUNG}
{/subloop:features.attributes}{/subloop-array:features}
[/jsoncontentimporter
PRO-Plugin (show only >0 values and only 6 items):
URL: https://www.stadt-koeln.de/externe-dienste/open-data/traffic.php
twig-Template:
{% set numb = 0 %} found features: {{features| length}}<br> {% for f in features %} {% if (f.attributes.auslastung>0) and (numb<6) %} {% set numb = numb + 1 %} {{numb}}. {{f.attributes.name}}: {{f.attributes.auslastung}}<br> {% endif %} {% endfor %}
jsoncontentimporterpro nameoftemplate=”koeln-open-data-traffic”