ShowPanel
Description
CIBlock::ShowPanel(
int IBLOCK_ID = 0,
int ELEMENT_ID = 0,
int SECTION_ID = "",
string type = "news",
bool bGetIcons = false,
string componentName = "",
array arLabels = array()
);
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. Static method.
See Also
Call parameters
Parmaeter | Description | Available from version |
---|---|---|
IBLOCK_ID | Iblock 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 | Iblock 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 | Iblock section ID.
If specified (greater than zero), buttons allowing the section properties modification of this section are added to the toolbar. | |
type | Iblock type.
If specified, a button allowing to create a new block is added to the toolbar. | |
bGetIcons | When parameter is true, returns array with button description instead of adding a button to the toolbar. | |
componentName | When set, displays a corresponding signature grouping the actions. If now specified, the name will be defined from the component 2.0 description, calling this method. | |
arLabels | When set, elements for this array will be used for displaying button names and popup hints. The following keys are available:
|
Note
When ELEMENT_ID is available, but IBLOCK_ID is not defined, the method automatically sets it. This applies for SECTION_ID parameter as well.Examples
<?
$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;
?>
© «Bitrix24», 2001-2024