本文整理匯總了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
)
);
?>