Last active
October 2, 2015 08:54
-
-
Save Itachi261092/5c13484a7153119d2a58 to your computer and use it in GitHub Desktop.
[1C-Bitrix / 1С-Битрикс] Image Resize in template news.list / Ресайз картинок в шаблоне news.list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
foreach ($arResult["ITEMS"] as $key => $arItem){ | |
// EXACT | |
$arResult["ITEMS"][$key]["RESIZE_PICTURE"] = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"]["ID"], array('width'=>100, 'height'=>100), BX_RESIZE_IMAGE_EXACT, true); | |
// PROPORTIONAL | |
//$arResult["ITEMS"][$key]["RESIZE_PICTURE"] = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"]["ID"], array('width'=>100, 'height'=>100), BX_RESIZE_IMAGE_PROPORTIONAL, true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment