Нужна помощь, перепробывал многое. Отображение в строку.
ШАБЛОН КОМПОНЕНТА
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
$TOP_DEPTH = $arResult["SECTION"]["DEPTH_LEVEL"];
$CURRENT_DEPTH = $TOP_DEPTH;
foreach($arResult["SECTIONS"] as $arSection)
{
$this->AddEditAction($arSection['ID'], $arSection['EDIT_LINK'], CIBlock::GetArrayByID($arSection["IBLOCK_ID"], "SECTION_EDIT"));
$this->AddDeleteAction($arSection['ID'], $arSection['DELETE_LINK'], CIBlock::GetArrayByID($arSection["IBLOCK_ID"], "SECTION_DELETE"), array("CONFIRM" => GetMessage('CT_BCSL_ELEMENT_DELETE_CONFIRM')));
if($CURRENT_DEPTH < $arSection["DEPTH_LEVEL"])
{
echo "\n",str_repeat("\t", $arSection["DEPTH_LEVEL"]-$TOP_DEPTH),"<ul>";
}
elseif($CURRENT_DEPTH == $arSection["DEPTH_LEVEL"])
{
echo "</li>";
}
else
{
while($CURRENT_DEPTH > $arSection["DEPTH_LEVEL"])
{
echo "</li>";
echo "\n",str_repeat("\t", $CURRENT_DEPTH-$TOP_DEPTH),"</ul>","\n",str_repeat("\t", $CURRENT_DEPTH-$TOP_DEPTH-1);
$CURRENT_DEPTH--;
}
echo "\n",str_repeat("\t", $CURRENT_DEPTH-$TOP_DEPTH),"</li>";
}
echo "\n",str_repeat("\t", $arSection["DEPTH_LEVEL"]-$TOP_DEPTH);
?>
<ul id="items-list" class="items-tile" >
<li id="<?=$this->GetEditAreaId($arSection['ID']);?>" class="before after ease-out"><div class="pd20">
<div class="h4"><a href="<?=$arSection["SECTION_PAGE_URL"]?>"><?=$arSection["NAME"]?></a></div>
<div class="content text-small mb10"><?=$arSection["DESCRIPTION"]?></div>
</div></li>
</ul>
<?
$CURRENT_DEPTH = $arSection["DEPTH_LEVEL"];
}
while($CURRENT_DEPTH > $TOP_DEPTH)
{
echo "</li>";
echo "\n",str_repeat("\t", $CURRENT_DEPTH-$TOP_DEPTH),"</ul>","\n",str_repeat("\t", $CURRENT_DEPTH-$TOP_DEPTH-2);
$CURRENT_DEPTH--;
}
?>