Код компонента gallery
Создайте файл /Project/components/gallery.php с таким кодом:
defined('PROLOGUE__FRAMEWORK') or die ;
if ($arData['catalogCode'] AND $arData['id'] AND $arData['arrayName']) {
$this -> model($arData['catalogCode']);
$element = $this -> $arData['catalogCode'] -> where(['id=' => $arData['id']]) -> getRecords('one');
if ($element['images']) {
foreach (PrArray::uncompress($element['images']) as $image) {
$arData['images'][] = [
'prev' => PrImager::resize($image, 400, 400, true, 'img-729'),
'big' => PrImager::resize($image, 900, false, false, 'img-45234'),
'origin' => Pr::BuildPath($image, false)];
}
}
$arData['editButton'] = $this -> view -> cntEditorElement($arData['catalogCode'], $element['id']);
$this -> view -> $arData['arrayName'] = $arData;
}