Documentation

Handling Site Types, Scopes

Site types

Site can have the following types.

  • Main types:
    • PAGE (from Home Page) - standard sites.
    • STORE - online stores.
    • SMN - site, used in the Sites24 section, in the admin section of Bitrix24 On-premise.
  • Additional types:
    • KNOWLEDGE –– knowledge bases.
    • GROUP –– knowledge bases for social network groups.

Presently, type expansion is not supported.

Scopes

In addition to the separating function, separation by access permissions, called scope, exist on the component level.

When you are working with main types, no additional actions are required.
You need to install a scope before working with additional site types. In case of REST, you can do that by passing scope as an additional parameter.

Example

The example demonstrates method to get list of pages. However, this applies to any other method, including for handling access permissions and entity updates.

BX24.callMethod(
    'landing.landing.getList',
    {
        params: {
            select: [
                'ID', 'TITLE'
            ],
            filter: {
                TITLE: '%services%',
                SITE_ID: 205
            },
            order: {
                ID: 'DESC'
            }
        },
        scope: 'knowledge'
    },
    function(result)
    {
        if(result.error())
        {
            console.error(result.error());
        }
        else
        {
            console.info(result.data());
        }
    }
);


© «Bitrix24», 2001-2024
Up