Bitrix Site Manager

CIBlockSection::GetNavChain

CDBResult
CIBlockSection::GetNavChain(
 int IBLOCK_ID,
 int SECTION_ID
);
Returns the path from the root to the section identified by the SECTION_ID.

Parameters

ParameterDescription
IBLOCK_ID Information block ID. Used to check that the section SECTION_ID is the child of this information block. If null, no check is performed.
SECTION_ID The ID of the section path to which is required.

Return Values

Returns an instance of CDBResult with fields of the information block section.

See Also

  • CDBResult
  • Section fields

    Example


    <?
    $nav = CIBlockSection::GetNavChain(false, $SECTION_ID);
    while($nav->ExtractFields("nav_")):
    ?> &raquo; 
      <?if($SECTION_ID == $nav_ID):?>
        <?echo $nav_NAME?>
      <?else:?>
        <a class="navchain" 
         href="<?=$application->getcurpage()?>?iblock_id=<?=$iblock_id?>&section_id=<?=$nav_id?>#tb"><?echo $nav_NAME?></a>
      <?endif?>
    <?endwhile;?>