Bitrix Site Manager

CIBlock::ShowPanel

CIBlock::ShowPanel(
 int IBLOCK_ID = 0,
 int ELEMENT_ID = 0,
 int SECTION_ID = 0,
 string TYPE_ID = "news"
);
Adds the control buttons to the site toolbar. The buttons added are used to quickly switch to editing the objects of the Information Blocks module, with respect to the access permissions.

Parameters

ParameterDescription
IBLOCK_ID Information block ID.
If specified (greater than zero), buttons allowing the modification (changing parameters, adding elements and sections) of this information block are added to the toolbar.
ELEMENT_ID Information block element ID.
If specified (greater than zero), buttons allowing the modification (editing and viewing the revision history) of this element are added to the toolbar.
SECTION_ID Information block section ID.
If specified (greater than zero), buttons allowing the section properties modification of this section are added to the toolbar.
TYPE_ID Type of an information block.
If specified, a button allowing to create a new block is added to the toolbar.

Remarks

If the ELEMENT_ID is specified while the IBLOCK_ID is not, the function will automatically determine the latter.

See Also

  • CMain::ShowPanel()

    Example


    <?
    $IBLOCK_TYPE = 'catalog';
    if (CModule::IncludeModule('iblock')):
        if ($arIBlockElement = GetIBlockElement($_GET['ID'], $IBLOCK_TYPE)):
            CIBlock::ShowPanel($arIBlockElement['IBLOCK_ID'], $_GET['ID'], 0, $IBLOCK_TYPE);
            $APPLICATION->SetTitle($arIBlockElement['NAME']);
            $APPLICATION->AddChainItem($arIBlockElement['IBLOCK_NAME'], 
                                       $arIBlockElement['LIST_PAGE_URL']);
            ?>
            <?=$arIBlockElement['NAME']?><br>
            <?=$arIBlockElement['DETAIL_TEXT']?>
            <?
        endif;
    endif;
    ?>