예제 #1
0
$cache = new CPHPCache();
if ($cache->InitCache($CACHE_TIME, $CACHE_ID)) {
    $vars = $cache->GetVars();
    $APPLICATION->SetTitle($vars["NAME"]);
    if ($INCLUDE_IBLOCK_INTO_CHAIN == "Y") {
        $APPLICATION->AddChainItem($vars["NAME"]);
    }
    if (CModule::IncludeModule("iblock")) {
        if ($bDisplayPanel) {
            CIBlock::ShowPanel($ID, 0, $SECTION_ID, $vars["IBLOCK_TYPE_ID"]);
        }
    }
    $cache->Output();
} else {
    if (CModule::IncludeModule("iblock") && ($arIBlock = GetIBlock($ID, $IBLOCK_TYPE))) {
        if (IntVal($SECTION_ID) > 0 && ($arSection = GetIBlockSection($SECTION_ID, $arIBlock["IBLOCK_TYPE_ID"]))) {
            $PageTitle = $arSection["NAME"];
        } else {
            $PageTitle = $arIBlock["NAME"];
        }
        $APPLICATION->SetTitle($PageTitle);
        if ($INCLUDE_IBLOCK_INTO_CHAIN == "Y") {
            $APPLICATION->AddChainItem($PageTitle);
        }
        if ($bDisplayPanel) {
            CIBlock::ShowPanel($ID, 0, $SECTION_ID, $arIBlock["IBLOCK_TYPE_ID"]);
        }
        $cache->StartDataCache();
        $arSelect = array("ID", "DETAIL_PAGE_URL", "PREVIEW_PICTURE", "DATE_ACTIVE_FROM", "NAME", "PREVIEW_TEXT", "PREVIEW_TEXT_TYPE", "PROPERTY_*");
        $items = GetIBlockElementList($ID, $SECTION_ID, $SORT, $NEWS_COUNT, $FILTER, $arSelect);
        $items->NavPrint(GetMessage("T_NEWS_NEWS_NAVIG"));
예제 #2
0
foreach ($list_subsections as $l) {

    $EL = new CIBlockElement;
    $elements = $EL->GetList(
        array(),
        array(
            "IBLOCK_ID" => "17",
            "SECTION_ID" => $l["ID"],
            "INCLUDE_SUBSECTIONS" => "Y",
            "PROPERTY_BRAND_VALUE" => array($CURRENT_BRAND["VALUE"])
        )
    );
    $el = $elements -> GetNext();

    if ($el != false) {
        $sect = GetIBlockSection($l["ID"]);
        $list_subsections_filtered[] = $sect;
    }
}
?>
<h1><?=$CURRENT_BRAND["VALUE"]?></h1>
<div class="item-cards-list-cnt">
    <ul class="item-cards-list matrix categories">
        <?foreach ($list_subsections_filtered as $subsection) :
            $url = strtolower($subsection["SECTION_PAGE_URL"] . $CURRENT_BRAND["XML_ID"] . "/");

            ?>
            <li class="item-card-item">
                <a href="<?=$url?>">
                    <div class="img-cnt">
                        <img src="/img/img_dummy.png" data-src="<?=CFIle::GetPath($subsection["~PICTURE"])?>" alt=""/></div>