Answer the question
In order to leave comments, you need to log in
How to output multiple ms2gallery galleries from resources?
Output in template
{$_modx->runSnippet('ms2gallery', [
'resources' => '1,2,3',
'tpl' => 'tpl.gallery_portfolio',
])}
{if $files?}
<div class="portfolio-item-2">
<div class="slider-title">Название услуги</div>
<div class="portfolio-slider owl-carousel">
{foreach $files as $file}
<div class="item">
<img src="{$file['large']}" alt="{$_modx->resource.pagetitle}" title="{$_modx->resource.pagetitle}" class="img-responsive">
</div>
{/foreach}
</div>
</div>
{else}
<img src="{('assets_url' | option) ~ 'components/ms2gallery/img/web/ms2_medium.png'}" alt="" title=""/>
{/if}
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