
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<? if(!empty($arResult["CATEGORIES"]) && $arResult['CATEGORIES_ITEMS_EXISTS']):?>
    <div class="search_title_content">
        <?foreach($arResult["CATEGORIES"] as $category_id => $arCategory):?>
            <?foreach($arCategory["ITEMS"] as $i => $arItem):?>
                    <?if($category_id === "all"):?>
                    <?elseif(isset($arResult["ELEMENTS"][$arItem["ITEM_ID"]])):
                        $arElement = $arResult["ELEMENTS"][$arItem["ITEM_ID"]];
//                    echo '<pre>';
//                    print_r($arElement);
//                    echo '</pre>';
                        ?>
                        <div class="search_title_content_name">
                            <a href="<?echo $arItem["URL"]?>">
                                <img src="<?echo $arElement["PICTURE"]["src"]?>">
                                <span><?echo $arItem["NAME"]?></span>
                            </a>
                        </div>
                    <?else:?>
                    <?endif;?>
            <?endforeach;?>
        <?endforeach;?>
    </div>
<?endif;?>
