本文整理汇总了PHP中Sections::GenerateMarkup方法的典型用法代码示例。如果您正苦于以下问题:PHP Sections::GenerateMarkup方法的具体用法?PHP Sections::GenerateMarkup怎么用?PHP Sections::GenerateMarkup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sections
的用法示例。
在下文中一共展示了Sections::GenerateMarkup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: include_once
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<h1><?=$arResult["SECTION"]["NAME"]?></h1>
<?
$arResult["ID"] = $arResult['SECTION']['ID'];
$arResult["IS_ROOT_SECTION"] = true;
include_once($_SERVER["DOCUMENT_ROOT"]."/include/catalog_filter.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/include/Sections.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/include/process_filter_in_url.php.php");
$sections = $arResult["SECTIONS"];
$filter = UrlFilter::GetFilter($arResult['SECTION']['CODE']);
if ($filter !== false) {
$arFilter = array($filter['query-name']=>$filter['value']);
$sections = Sections::RemoveEmptySections($arResult["SECTIONS"], $arFilter);
}
?>
<div class="item-cards-list-cnt categories">
<?= Sections::GenerateMarkup($sections) ?>
<div class="preload-overlay"><i></i></div>
</div>
示例2: count
if (strpos($key,"filter")===0 && is_array($value))
$c += count($value);
}
return $c;
}
//======== Process sections (if in category of depth = 1)
$htmlForSections="";
if ($_REQUEST['is_root_section']) {
$propFilter = $GLOBALS["arrFilterAjaxSection"];
$sectionId = $_REQUEST['section_id'];
$arFilter = Array("IBLOCK_ID" => $arResult["IBLOCK_ID"], "SECTION_ID" => $sectionId);
$arFilter = array_merge($propFilter,$arFilter);
require_once($_SERVER["DOCUMENT_ROOT"] . "/include/Sections.php");
$nonEmptySections = Sections::GetNonEmpty3($arFilter);
$htmlForSections = Sections::GenerateMarkup($nonEmptySections);
}
//============================
echo json_encode(
array(
"html" => ($html) ? $html : "", // elements
"sectionsHtml" => $htmlForSections, // sections
"page" => ($page) ? $page : "",
"showall" => $showAll,
"nonEmptyProps" => $nonEmptyProps,
"filterExpr" => $filterExpr
)
);
?>