I should say at the outset, apologies for the lengthy post - I have been struggling to figure this out for some time now ,so have included as much info as possible to be helpful! I know I am missing something really obvious…
I’m currently in the process of creating a new design layout for my site, www.racingcircuits.info using the components from MDBootstrap. I’m struggling with with adapting one of my existing templates which makes use of MIGX.
It is my template for an individual circuit page (see Autódromo Internacional do Algarve - RacingCircuits.info as a current example).
This is the data in the MIGX array for this example page:
Array
(
[MIGX_id] => 3
[date] => 2021
[info] => [{"MIGX_id":"1","title":"Car Circuit","length":"2.891 miles / 4.653 km","map":"assets/images/maps/Europe/Portugal/Portimao/Portimao-2021.png"},{"MIGX_id":"2","title":"Car Circuit with T1 chicane","length":"2.911 miles / 4.684 km","map":"assets/images/maps/Europe/Portugal/Portimao/Portimao-Chicane-2021.png"},{"MIGX_id":"3","title":"Bike Circuit","length":"2.853 miles / 4.592 km","map":"assets/images/maps/Europe/Portugal/Portimao/Portimao-Bike-2021.png"},{"MIGX_id":"4","title":"Bike Circuit with T1 chicane","length":"2.904 miles / 4.674 km","map":"assets/images/maps/Europe/Portugal/Portimao/Portimao-Bike-Chicane-2021.png"}]
[_alt] => 0
[_first] => 1
[_last] =>
[idx] => 1
[property.tvname] => circuits
[property.tpl] =>
)
Array
(
[MIGX_id] => 2
[date] => 2020
[info] => [{"MIGX_id":"1","title":"Car Circuit","length":"2.891 miles \/ 4.653 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-2020.png"},{"MIGX_id":"2","title":"Car Circuit with T1 chicane","length":"2.911 miles \/ 4.684 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-Chicane-2020.png"},{"MIGX_id":"3","title":"Bike Circuit","length":"2.853 miles \/ 4.592 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-Bike-2020.png"},{"MIGX_id":"4","title":"Bike Circuit with T1 chicane","length":"2.904 miles \/ 4.674 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-Bike-Chicane-2020.png"}]
[_alt] => 1
[_first] =>
[_last] =>
[idx] => 2
[property.tvname] => circuits
[property.tpl] =>
)
Array
(
[MIGX_id] => 1
[date] => 2008-19
[info] => [{"MIGX_id":"1","title":"Car Circuit","length":"2.920 miles \/ 4.699 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-1-2008.png"},{"MIGX_id":"2","title":"Car Circuit with T1 chicane","length":"2.911 miles \/ 4.684 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-2-2008.png"},{"MIGX_id":"3","title":"Bike Circuit","length":"2.894 miles \/ 4.658 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-Bike1-2008.png"},{"MIGX_id":"4","title":"Bike Circuit with T1 chicane","length":"2.904 miles \/ 4.674 km","map":"assets\/images\/maps\/Europe\/Portugal\/Portimao\/Portimao-Bike2-2008.png"}]
[_alt] => 0
[_first] =>
[_last] => 1
[idx] => 3
[property.tvname] => circuits
[property.tpl] =>
)
What I’m stuggling with is writing the relevant getImageList calls to be able to output at the frontend in my new layout.
These are my various template entries:
<section id="maps">
<!-- Map Panel -->
<!-- Tab panels -->
<div class="tab-content ml-n2 mt-n3">
[[getImageList?
&tvname=`circuits`
&tpl=`migx-circuit-tabpanel`
]]
</div>
<!-- Tab panels -->
<!-- Timeline nav -->
<ul class="nav nav-tabs md-tabs primary-color mx-n1 mt-n3" role="tablist">
[[getImageList?
&tvname=`circuits`
&tpl=`migx-circuit-bar-render`
]]
</ul>
<!-- End of Timeline nav -->
<!-- End of Map Panel -->
</section>
For migx-circuit-tabpanel:
<!-- Panel [[+idx]] -->
<div class="tab-pane fade in show [[If? &subject=`[[+idx]]` &operator=`===` &operand=`1` &then=`active`]]" id="panel[[+idx]]" role="tabpanel">
<div class="row justify-content-between">
<div class="col-md-8 mt-n2 ml-n2 p-0">
<div class="tab-content mt-n4" id="nav-tabContent">
[[getImageList?
&tvname=`circuits`
&tpl=`migx-circuit-images`
]]
</div>
</div>
<div class="col-md-4 mt-0 mr-0 mb-3 p-0">
<div class="list-group z-depth-1 scrollbar-primary overflow-auto" id="list-tab" role="tablist">
[[getImageList?
&tvname=`circuits`
&tpl=`migx-circuit-data`
]]
</div>
</div>
</div>
</div>
<!-- End of Panel [[+idx]] -->
For migx-circuit-images:
<div class="tab-pane fade [[If? &subject=`[[+idx]]` &operator=`===` &operand=`1` &then=`show active`]]" id="map_[[+idx]]" role="tabpanel" aria-labelledby="map_[[+idx]]_data"><img src="[[getImageList? &value=`[[+info]]` &limit=`1` &tpl=`@CODE:[[+map]]`]]" class="img-fluid z-depth-1" alt="Map of [[*pagetitle]], [[+title]] [[!getImageList? &tvname=`circuits` &tpl=`@CODE:[[+date]]` &limit=`1`]]"></div>
For migx-circuit-data:
<a class="list-group-item list-group-item-action [[If? &subject=`[[+idx]]` &operator=`===` &operand=`1` &then=`active`]]" id="map_[[+idx]]_data" data-toggle="list" href="#map_[[+idx]]"role="tab" aria-controls="map_[[+idx]]"><strong>[[!getImageList? &value=`[[+info]]` &limit=`1` &tpl=`@CODE:[[+title]]`]]</strong><span class="badge badge-light z-depth-0 ml-2">[[!getImageList? &tvname=`circuits` &tpl=`@CODE:[[+date]]` &limit=`1`]]</span></strong><br /><small>[[!getImageList? &value=`[[+info]]` &limit=`1` &tpl=`@CODE:[[+length]]`]]</small></a>
What this currently outputs is the following:
How can I get it to show the full content of [info] array for each [date] iteration?. The tabs for 2020/2008-19 are identical to the 2021 one above.
I obviously want it to show the data as per the array groupings. What am I doing wrong?