Documentation

landing.site.addFolder

landing.site.addFolder(
    siteId,
    fields
)

Method adds a site folder.

Parameters

Parameter Description Available from version
siteId Site ID.

Attention: Requires access permissions for writing to specified site.

fields Folder fields:
  • ACTIVE – folder active status (Y/N). Created as inactive by default;
  • TITLE – folder header (name);
  • CODE – folder symbolic code (portion of folder page URL). Transliterated from folder name by default.

Example

BX24.callMethod(
    'landing.site.addFolder',
    {
        siteId: 1817,
        fields: {
            TITLE: 'New folder'
        }
    },
    function(result)
    {
        if(result.error())
        {
            console.error(result.error());
        }
        else
        {
            console.info(result.data());
        }
    }
);


© «Bitrix24», 2001-2024