W
W
Whiteweb2014-05-06 15:22:55
1C-Bitrix
Whiteweb, 2014-05-06 15:22:55

Pagination as a date, can someone tell me how

It is not possible to make pagination of sections in the form of a date, can someone tell me how.
Here is the component I don't understand:

/**
 * 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();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxyc webber, 2014-06-25
@MyNameIsSylor

date pagination? give an example? if this is what I think, then in the news section there is such a "pagination"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question