В шаблоне так:
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li class="<?if ($arItem["SELECTED"]):?>active<?endif?>"><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a></li>
<?else:?>
<li<?if ($arItem["SELECTED"]):?> class="item-selected"<?endif?>>
<a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a>
<img src="<?=$arItem["PREVIEW_PICTURE"]["SRC"]?>" /></li>
<?endif?>
и добавил result_modifier.php
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
foreach($arResult["ITEMS"] as $i=>$arItem) {
if (is_array($arItem["PREVIEW_PICTURE"])) {
$ratio = $arItem["PREVIEW_PICTURE"]["WIDTH"] / $arItem["PREVIEW_PICTURE"]["HEIGHT"];
$width = 250;
$height = round($width / $ratio);
$img = CFile::ResizeImageGet($arItem["PREVIEW_PICTURE"], array("width" => $width, "height" => $height), BX_RESIZE_IMAGE_EXACT);
$arResult["ITEMS"][$i]["PREVIEW_PICTURE"]["SRC"] = $img["src"];
$arResult["ITEMS"][$i]["PREVIEW_PICTURE"]["WIDTH"] = $width;
$arResult["ITEMS"][$i]["PREVIEW_PICTURE"]["HEIGHT"] = $height;
}
}
?>
и почему-то не работает, подскажите где ошибка?