Advertisement
Guest User

Untitled

a guest
May 20th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.88 KB | None | 0 0
  1. <?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
  2. /** @var array $arParams */
  3. /** @var array $arResult */
  4. /** @global CMain $APPLICATION */
  5. /** @global CUser $USER */
  6. /** @global CDatabase $DB */
  7. /** @var CBitrixComponentTemplate $this */
  8. /** @var string $templateName */
  9. /** @var string $templateFile */
  10. /** @var string $templateFolder */
  11. /** @var string $componentPath */
  12. /** @var CBitrixComponent $component */
  13. $this->setFrameMode(true);?><?if (!empty($arResult)) { ?>
  14.     <ul>
  15.     <?
  16.     $previousLevel = 0;
  17.     foreach($arResult as $arItem) { ?>
  18.         <? if ($previousLevel && $arItem["DEPTH_LEVEL"] < $previousLevel) { ?>
  19.             </ul></div></div></div></div></li>
  20.         <? } ?>
  21.         <? if ($arItem["IS_PARENT"]) { ?>
  22.             <? if ($arItem["DEPTH_LEVEL"] == 1) { ?>
  23.  
  24.                 <li class="parent">
  25.                 <a tabindex="1" href="<?=($arItem["PARAMS"]['NO']=="Y" ? "javascript:void(0);":$arItem["LINK"])?>" <?=($arItem["PARAMS"]['NO']=="Y" ? "class='btn-no'":"")?>><?=$arItem["TEXT"]?><?=$arItem["DEPTH_LEVEL"]?> <?=($arItem["IS_PARENT"])?></a>
  26.                     <div class="second-level container">
  27.                         <div class="content">
  28.                             <div class="col col-mb-12">
  29.                                 <div class="content">
  30.                                     <ul class="clearfix">
  31.             <? } ?>
  32.         <? } else { ?>
  33.             <li class="is_parent_else <?=$arItem["PARAMS"]["CSS"]?>"><a href="<?=($arItem["PARAMS"]['NO']=="Y" ? "javascript:void(0);":$arItem["LINK"])?>" <?=($arItem["PARAMS"]['NO']=="Y" ? "class='btn-no h4'":"")?>><?=$arItem["TEXT"]?><?=$arItem["DEPTH_LEVEL"]?> <?=($arItem["IS_PARENT"])?></a></li>
  34.  
  35.         <? } ?>
  36.         <?$previousLevel = $arItem["DEPTH_LEVEL"];?>
  37.     <? } ?>
  38.     <? if ($previousLevel > 1) { ?>
  39. </ul></div></div></div></div></li>
  40.     <? } ?>
  41.     </ul>
  42. <? } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement