Documentation

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

ParmaeterDescriptionAvailable 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.
bGetIconsWhen parameter is true, returns array with button description instead of adding a button to the toolbar.
componentNameWhen 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.
arLabelsWhen set, elements for this array will be used for displaying button names and popup hints. The following keys are available:
  • ELEMENT_ADD_TEXT - button text for added element;
  • ELEMENT_ADD_TITLE - popup button hint for added element;
  • ELEMENT_EDIT_TEXT - element edit button text;
  • ELEMENT_EDIT_TITLE - popup hint for element edit button;
  • ELEMENTS_NAME_TEXT - button text for viewing element list;
  • ELEMENTS_NAME_TITLE - popup hint for element list view button;
  • SECTION_ADD_TEXT - button text for adding a section;
  • SECTION_ADD_TITLE - popup hint for adding section button;
  • SECTION_EDIT_TEXT - button text for editing section;
  • SECTION_EDIT_TITLE - popup hint for section edit button;
  • SECTIONS_NAME_TEXT - text for element list viewing button;
  • SECTIONS_NAME_TITLE - popup hint for element list viewing button.

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
Up