Answer the question
In order to leave comments, you need to log in
MODX evo how to call a chunk with parameters?
there is a snippet in which the {{newsBlock}} chunk should be called N times
<?php
for ( $i = 0; $i < $n; $i++ ) {
echo '{{newsBlock}}';
}
?>
<div class="newsBlock">
<p class="title"></p>
<p class="content"></p>
</div>
<div class="newsBlock">
<p class="title">Title 1</p>
<p class="content">Content 1</p>
</div>
<div class="newsBlock">
<p class="title">Title 2</p>
<p class="content">Content 2</p>
</div>
....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question