<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="bx_search_popap">
    <? foreach ($arResult["CATEGORIES"] as $category_id => $arCategory): ?>
        <? foreach ($arCategory["ITEMS"] as $i => $arItem):
//
//            echo '<pre>';
//            print_r($arItem);
//            echo '</pre>';
            ?>
            <? if ($category_id === "all"): ?>
            <? else: ?>
                <a href="<?=$arItem['URL']?>">
                    <?=$arItem['NAME']?>
                </a>
            <? endif; ?>
        <? endforeach; ?>
    <? endforeach; ?>
</div>