Documentation

Behaviour parameters

Closing slider after saving

ParameterTypeBy defaultDescription
CLOSE_AFTER_SAVEbooleanfalseStandard behaviour, saves and closes slider after button is clicked. When error occurs when saving, slider won't close.
Important: redirects when saving must return to the same page, not to a list.


Grid update

ParameterTypeBy defaultDescription
RELOAD_GRID_AFTER_SAVEbooleanfalseStandard behaviour after slider updates and closes - update the grid from which the slider was called. Updates the first found grid on page, from which slider was opened.


Page updating

ParameterTypeBy defaultDescription
RELOAD_PAGE_AFTER_SAVEbooleanfalseSimilar to the previous case. When there is no grid, update the page updating and closing slider.


showing notifications

ParameterTypeBy defaultDescription
NOTIFICATIONstring | arraynullShows notification after saving and closing slider. When detail page is opened not from the list, it's useful to display notification about successful saving.

$APPLICATION->IncludeComponent(
    'bitrix:ui.sidepanel.wrapper',
    '',
    [
        'POPUP_COMPONENT_NAME' => 'bitrix:crm.button.edit',
        'POPUP_COMPONENT_TEMPLATE_NAME' => '',
        'POPUP_COMPONENT_PARAMS' => [],
        'NOTIFICATION' => 'Успешно сохранено!',
    ]
);

Parameter can pass the array key => value. It will be used as parameter when calling BX.UI.Notification.Center.notify.



Setting target="_top" in links

It's recommended to manually set target="_top" in links.



Page opening only in slider

ParameterTypeBy defaultDescription
PAGE_MODEbooleantrueBy default page can open in both slider and a separate page (updating page, opened in slider).

When PAGE_MODE=false, shows loader when opening a page via direct link, and then opens a slider with content of the same page. When closing sider, redirects to the main page or page specified in the parameter PAGE_MODE_OFF_BACK_URL.

PAGE_MODE_OFF_BACK_URL' / 'string


Examples

// Page opens from grid. Configure closing after save and grid update:
$APPLICATION->IncludeComponent(
    'bitrix:ui.sidepanel.wrapper',
    '',
    [
        'POPUP_COMPONENT_NAME' => 'bitrix:crm.button.edit',
        'POPUP_COMPONENT_TEMPLATE_NAME' => '',
        'POPUP_COMPONENT_PARAMS' => [
            'PATH_TO_BUTTON_LIST' => $arResult['PATH_TO_BUTTON_LIST'],
            'PATH_TO_BUTTON_EDIT' => $arResult['PATH_TO_BUTTON_EDIT'],
            'PATH_TO_BUTTON_FILL' => $arResult['PATH_TO_BUTTON_FILL'],
            'PATH_TO_USER_PROFILE' => $arResult['PATH_TO_USER_PROFILE'],
            'ELEMENT_ID' => $arResult['VARIABLES']['id']
        ]
        'CLOSE_AFTER_SAVE' => true,
        'RELOAD_GRID_AFTER_SAVE' => true,
    ]
);
© «Bitrix24», 2001-2024
Up