Не получается сделать пагинацию разделов в виде даты, может кто подскажет как.
Вот компонент не пойму разобраться:
/**
* Bitrix Component
*
* @var array $arParams
* @var array $arResult
* @var CBitrixComponent $this
* @var CMain $APPLICATION
* @var CUser $USER
*/
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
$gsAlbums=CIBlockSection::GetList(
Array("SORT"=>"ASC"),
Array("IBLOCK_CODE"=>"photo_construction", "LID"=>SITE_ID, "ACTIVE"=> "Y"),
false,
array(),
array("nPageSize" => 3)
);
while($ar_fields = $gsAlbums->GetNext())
{
$arFilter = Array(
"IBLOCK_CODE" => "photo_construction",
"LID" => SITE_ID,
"ACTIVE" => "Y",
"ACTIVE_DATE" => "Y",
"SECTION_ID" => $ar_fields["ID"]
);
$res = CIBlockElement::GetList(array("SORT"=>"ASC", "ID"=>"ASC"), $arFilter, array(
"ID",
"CODE",
"NAME",
"PREVIEW_TEXT",
"PREVIEW_PICTURE",
"DETAIL_PICTURE"
));
if ($arImages = $res->GetNext())
{
if (intval($arImages["PREVIEW_PICTURE"]))
{
$file = CFile::GetByID($arImages["PREVIEW_PICTURE"])->Fetch();
$arImages["PREVIEW_PICTURE_URL"] = "/".COption::GetOptionString("main", "upload_dir", "upload")."/".$file["SUBDIR"]."/".$file["FILE_NAME"];
}
if (intval($arImages["DETAIL_PICTURE"]))
{
$file = CFile::GetByID($arImages["DETAIL_PICTURE"])->Fetch();
$arImages["DETAIL_PICTURE_URL"] = "/".COption::GetOptionString("main", "upload_dir", "upload")."/".$file["SUBDIR"]."/".$file["FILE_NAME"];
}
$ar_fields["IMAGE"] = $arImages;
}
$arResult["LIST"][] = $ar_fields;
}
$this->IncludeComponentTemplate();