<?php
$media = $resource;
$sortedMedia = $this->sortMedia([$media]);

if (isset($sortedMedia['lightMedia'])):
    echo $this->lightGalleryOutput($sortedMedia['lightMedia']);
else:
    echo $this->partial('common/resource-page-block-layout/media-render');
endif;
