Create a JCI-Template “playerlist2”:
URL: http://api.snooker.org/?rt=MoneyRankings&s=2021
Name: playerlist2
twig-template:
{% for i in _context | slice(0,5) %} {% if i.PlayerID > 0 %} {{i.Position}}. <a href="/playerdetail/?pid={{i.PlayerID}}" target="_blank">PlayerID: {{i.PlayerID}}</a> <br> {% endif %} {% endfor %}
Then use this Shortcode:
[[jsoncontentimporterpro nameoftemplate="playerlist2"]]
For the details page create another JCI-Template “playerdetails2”:
Name: playerdetails2
URL:
http://api.snooker.org/?p={{urlparam.pid}}
urlparam4twig: pid
twig-template:
<img src="{{_context.0.Photo}}"> <br> {{ _context.0.FirstName}} {{ _context.0.MiddleName}} {{ _context.0.LastName}} <br> born {{ _context.0.Born | date("d.m.Y") }}
Use the following Shortcode on a page with URL “/playerdetail/”
[[jsoncontentimporterpro nameoftemplate="playerlist2"]]
In Action: