[[migxLoopCollection? &classname=`Match` &packageName=`matches` &limit=`1` &tpl=`tpl.boomerang.match-block` ]]
<div class="wp-block article grid bb">
<div class="article-image">
<img src="images/default.jpg" alt="">
</div>
<span class="article-category">[[+series]]</span>
<h3 class="title">
<a href="" hidefocus="true">[[+description]]</a>
</h3>
<p>
[[+matchdate]]</br>
[[+facility]]
</p>
</div><div class="wp-block article grid bb">
<div class="article-image">
<img src="images/default.jpg" alt="">
</div>
<span class="article-category">P15 4F</span>
<h3 class="title">
<a href="" hidefocus="true">IFK Tumba FK 1 - Mälarhöjdens IK 2</a>
</h3>
<p>
2015-05-17 11:15:00</br>
Storvretens BP 1
</p>
</div>
<pre>Array
(
[id] => 26
[series] => P15 4F
[description] => IFK Tumba FK 1 - Mälarhöjdens IK 2
[facility] => Storvretens BP 1
[matchid] => 151152033
[matchdate] => 2015-05-17 11:15:00
[_alt] => 0
[_first] => 1
[_last] => 1
[idx] => 1
[property.classname] => Match
[property.packageName] => matches
[property.tpl] => tpl.boomerang.match-block
[property.limit] => 1
[property.debug] => 0
)
</pre>
SELECT `Match`.`id`, `Match`.`series`, `Match`.`description`, `Match`.`facility`, `Match`.`matchid`, `Match`.`matchdate` FROM `modx_matches` AS `Match` LIMIT 1 <pre>Array
(
[id] => 26
[series] => P15 4F
[description] => IFK Tumba FK 1 - Mälarhöjdens IK 2
[facility] => Storvretens BP 1
[matchid] => 151152033
[matchdate] => 2015-05-17 11:15:00
[_alt] => 0
[_first] => 1
[_last] => 1
[idx] => 1
[property.classname] => Match
[property.packageName] => matches
[property.tpl] => tpl.boomerang.match-block
[property.limit] => 1
[property.debug] => 1
)
</pre>
tpl.boomerang.match-block
boomerang_match_block
[[migxLoopCollection? &classname=`Match` &packageName=`matches` &limit=`1` &debug = `0` &tpl=`@CODE:[[+description]]` ]]
&prefix=`yourprefix_`
This should only happen, when $modx->getChunk does return an empty result.
Can't see anything wrong with your setup.
&tpl=`@CODE:<div class="wp-block article grid bb">
<div class="article-image">
<img src="images/default.jpg" alt="">
</div>
<span class="article-category">[[+series]]</span>
<h3 class="title">
<a href="" hidefocus="true">[[+description]]</a>
</h3>
<p>
[[+matchdate]]</br>
[[+facility]]
</p>
</div>`I think I got something similar when I omittedDefault table prefix is used here and as you can see the array output actually contains the correct data so the retrieving the data doesn't seem to be the main problem.from the migxLoopCollection call. Of course, you don't need this if you are using the default table prefix.&prefix=`yourprefix_`
Thanks for the heads up! I did see fullstops being used in chunk and template names in some tutorials so I thought this was ok. I'll go with your advice here from now on though. This is my first real MODX project so I don't want to cause unnecessary problems for myself
BTW, don't ever use fullstops in any of your names - you'll get really weird errors (or nothing at all).
&prefix=``