- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?if (!empty($arResult)):?>
<nav class="mainNav">
<table>
<tbody><tr>
<?
$i = 0;
$previousLevel = 0;
//echo '<pre>'; print_r($arResult); echo '</pre>';
$CatItemMenu = str_replace("/", "", $arResult[0]['LINK']);
foreach($arResult as $arItem):?>
<?$i++;?>
<?if ($previousLevel && $arItem["DEPTH_LEVEL"] < $previousLevel):?>
<?if($previousLevel != 3):?>
<?=str_repeat("</ul></li>", ($previousLevel - $arItem["DEPTH_LEVEL"]));?>
<?endif;?>
<?if($previousLevel == 3):?>
</li></ul>
<div class="someProduct" style="min-height: 336px;">
<a class="productLink" href="<?=$arResult["CATALOG_MENU"][$CatItemMenu]["DETAIL_PAGE_URL"]?>">
<span class="image"><img alt="" src="<?=$arResult["CATALOG_MENU"][$CatItemMenu]["PICTURE_SRC"]?>"></span>
<span><?=$arResult["CATALOG_MENU"][$CatItemMenu]["NAME"]?></span>
<?if($arResult["CATALOG_MENU"][$CatItemMenu]["SALE_PRICE"] < $arResult["CATALOG_MENU"][$CatItemMenu]["CATALOG_PRICE_1"]):?>
<span class="oldPrice"><?=$arResult["CATALOG_MENU"][$CatItemMenu]["CATALOG_PRICE_1"]?> руб.</span>
<span class="newPrice"><?=$arResult["CATALOG_MENU"][$CatItemMenu]["SALE_PRICE"]?> руб.</span>
<?else:?>
<span class="newPrice"><?=$arResult["CATALOG_MENU"][$CatItemMenu]["CATALOG_PRICE_1"]?> руб.</span>
<?endif;?>
</a> </div></div> <?endif;?> <?endif?><?if ($arItem["IS_PARENT"]):?> <?if ($arItem["DEPTH_LEVEL"] == 1):?>
<td><div><a href="<?=$arItem["LINK"]?>" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>"><?=$arItem["TEXT"]?></a>
<div class="test_mark" style=""><ul>
<?else:?>
<?if($arItem["DEPTH_LEVEL"] == 2):?>
<li><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?><ins>»</ins></a>
<div class="test_mark" style="min-height: 336px;"><ul style="min-height: 304px;">
<?else:?>
<li><a href="<?=$arItem["LINK"]?>" class="parent<?if ($arItem["SELECTED"]):?> item-selected<?endif?>"><?=$arItem["TEXT"]?></a>
<ul>
<?endif;?>
<?endif?>
<?else:?>
<?if ($arItem["PERMISSION"] > "D"):?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li><a href="<?=$arItem["LINK"]?>" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>"><?=$arItem["TEXT"]?></a></li>
<?else:?>
<?if($arItem["DEPTH_LEVEL"] == 3):?>
<?//Танцы с бубном для вывода меню по два пункта. ?>
<?if($i%2):?>
<li>
<span><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a></span>
<?if($arResult[$i]["DEPTH_LEVEL"] == 3):?><span><a href="<?=$arResult[$i]["LINK"]?>"><?=$arResult[$i]["TEXT"]?></a></span><?endif;?>
<?if($arResult[$i-3]["DEPTH_LEVEL"] == 2 && $arItem["TEXT"] != $arResult[$i-1]["TEXT"]):?><span><a href="<?=$arResult[$i-1]["LINK"]?>"><?=$arResult[$i-1]["TEXT"]?></a></span><?endif;?>
<?endif;?>
<?if(!($i%2)):?></li><?endif;?>
<?//Танцы Окончены. ?>
<?else:?>
<li><a href="<?=$arItem["LINK"]?>" <?if ($arItem["SELECTED"]):?> class="item-selected"<?endif?>><?=$arItem["TEXT"]?></a></li>
<?endif;?>
<?endif?>
<?else:?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li><a href="" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>" title="<?=GetMessage("MENU_ITEM_ACCESS_DENIED")?>"><?=$arItem["TEXT"]?></a></li>
<?else:?>
<li><a href="" class="denied" title="<?=GetMessage("MENU_ITEM_ACCESS_DENIED")?>"><?=$arItem["TEXT"]?></a></li>
<?endif?>
<?endif?>
<?endif?>
<?$previousLevel = $arItem["DEPTH_LEVEL"];?>
<?
//Добавляем товар
if($arItem["DEPTH_LEVEL"] == 1){
$ClearLink = str_replace("/", "", $arItem['LINK']);
$CatItemMenu = $ClearLink;
//echo $ClearLink.' - '.$previousLevel;
}
?>
<?endforeach?>
<?if ($previousLevel > 1)://close last item tags?>
<?=str_repeat("</ul>", ($previousLevel-1) );?>
<?endif?>
</tr>
</tbody></table>
</nav>
<?endif?>
Lure Of Chaos 21.01.2014 02:13 # +1
и еще дохуя быдлоты.
inkanus-gray 21.01.2014 05:48 # 0
bormand 21.01.2014 06:59 # 0
Яндекса?
guest 21.01.2014 07:25 # 0
Vasiliy 21.01.2014 09:02 # 0