JCI and Google Spreadsheet
Situation:
You have a Google spreadsheet with data. Publish this Spreadshirt as CSV.
With that, you get something like
https://docs.google.com/spreadsheets/d/e/2PACX-1vSUBoYuyFoVPKnD-9sQUEZTbsXvVnoL5A-ydgsdKzw3DSfadYAINI834ZRsgRfSZdTGM99vs4yOty6D/pub?gid=0&single=true&output=csv
Show this data:
Create a JCI-Template with
name: googlespreadsheet
URL: see above
Curl options:
CURLOPT_FOLLOWLOCATION=TRUE
Twig-template:
<table border=1> {% for k,v in _parent %} <tr> {% for i in 0..((v | length)-1) %} {% set out = attribute(v, i) %} <td>{{out}}</td> {% endfor %} </tr> {% endfor %} </table>
Shortcode:
[jsoncontentimporterpro nameoftemplate=googlespreadsheet inputtype=csv inputtypeparam='{"delimiter": ",", "enclosure": "#QM#", "escape":"#BS#", "csvline": "#LF#", "skipempty": "yes"}']