Skip to content

Instantly share code, notes, and snippets.

@Sentinel-7
Last active June 1, 2024 00:47
Show Gist options
  • Save Sentinel-7/f28f5e49651b2f366218ccaec6940c37 to your computer and use it in GitHub Desktop.
Save Sentinel-7/f28f5e49651b2f366218ccaec6940c37 to your computer and use it in GitHub Desktop.
MIGX + разбивка по 3 блока
{set $rows = 1 | resource : 'partner' | fromJSON}
<div>
<ul class="partners">
{foreach $rows as $row index=$idx}
<li><a href="{$row.url}"><img src="{$row.image}" alt=""></a>{$idx}</li>
{if ($idx+1) % 3 == 0 && count($rows) > $idx+1 }
</ul> </div> <div> <ul class="partners">
{/if}
{/foreach}
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment