S
S
Sergey2017-03-08 21:42:40
MODX
Sergey, 2017-03-08 21:42:40

How to output multiple ms2gallery galleries from resources?

Output in template

{$_modx->runSnippet('ms2gallery', [
'resources' => '1,2,3',
'tpl' => 'tpl.gallery_portfolio',
])}

Other resources are indicated in the additional resource field, and how can I display the galleries of the specified resources from the additional field?
Now all the photos in the heap are displayed, and I need to display:
Resource name (from the additional field by id)
- photos
Resource name (from the additional field by id)
- photos
Resource name (from the additional field by id)
- photos
T. e. essentially run the chunk output in a loop. Help me please.
In a chunk
{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 question

Ask a Question

731 491 924 answers to any question