Documentation

Resort

CIBlockSection::Resort(
 int IBLOCK_ID
);

The method recalculates the left and right margins of all sections of an information block IBLOCK_ID.

Parameters

ParameterDescription
IBLOCK_ID Information block ID.

Remarks

You should remember to invoke this function after a series of calls to CIBlockSection::Add or CIBlockSection::Update if you set their parameter bReSort to false to increase the processing speed.

See Also

  • CIBlockSection::Add()
  • CIBlockSection::Update()

    Example


    <?
    $obSect = new CIBlockSection;
    for($i=0; $i < 100; $i++)
    {
        $obSect->Add(Array('NAME'=>'Section #'.$i,
                           'IBLOCK_ID'=>$IBLOCK_ID), 
                     false);
    }
    
    CIBlockSection::ReSort($IBLOCK_ID);
    ?>
    
  • © «Bitrix24», 2001-2024
    Up