Object Site: Overview of Methods

The Object Site allows you to create and configure various web pages: a company business card, an online store, and much more.

You can retrieve a list of all sites in Bitrix24 using the method landing.site.getList. To add a new site, use the method landing.site.add.

Quick navigation: all methods

Site Structure

Pages. They store the site's content. Managed by a group of methods landing.landing.*.
Folders. Optional. Used to group site pages and simplify navigation:

Linking Sites to Other Objects

User. The site is linked to users by numerical identifiers in the parameters CREATED_BY_ID and MODIFIED_BY_ID. You can obtain the user ID using the method user.get.

Actions with Sites

Sites can be updated using the method landing.site.update. This method changes the title, description, homepage, color palette, and other parameters.

Site parameters can be exported to an array using the method landing.site.fullExport. The resulting array should then be used in the method landing.demos.register.

How to Publish Site Content

To make the site accessible, call the method landing.site.publication. After publication, the site receives a unique URL, which can be obtained using the method landing.site.getPublicUrl.

When you need to publish a specific folder, use the method landing.site.publicationFolder.

How to Unpublish a Site

You can unpublish:

How to Delete Folders and a Site

A specific folder can be moved to the trash using the method landing.site.markFolderDelete. If you need to move the entire site, use the method landing.site.markDelete. Deleted folders and sites can be restored using the methods landing.site.markFolderUnDelete and landing.site.markUnDelete within 30 days.

To delete a site without the possibility of recovery, use the method landing.site.delete. This will permanently destroy the site along with all folders and pages.

User Documentation

Site Permissions

Access permissions allow you to control who can view and modify the site's content. Permissions are granted only by the portal administrator. Two permission models are supported:

You can determine the model using the method landing.role.isEnabled.

User Documentation

Overview of Methods

Scope: landing

Who can execute the method: any user

Method

Description

Available since

landing.site.add

Adds a site

landing.site.addFolder

Adds a folder to the site

21.800.0

landing.site.delete

Deletes a site

landing.site.fullExport

Exports the site and all its pages into a special array

landing.site.getFolders

Retrieves the site's folders

21.800.0

landing.site.getList

Retrieves a list of sites

landing.site.getPreview

Returns the preview image URL of the site

21.800.0

landing.site.getPublicUrl

Returns the full URL of the sites

18.7.500

landing.site.getadditionalfields

Retrieves additional fields of the site

landing.site.markDelete

Marks the site as deleted

landing.site.markFolderDelete

Marks the folder as deleted

21.800.0

landing.site.markFolderUnDelete

Restores the folder from the trash

21.800.0

landing.site.markUnDelete

Restores the site from the trash

landing.site.publication

Publishes the site and all its pages

landing.site.publicationFolder

Publishes the site's folder

21.800.0

landing.site.unPublicFolder

Unpublishes the site's folder

21.800.0

landing.site.unpublic

Unpublishes the site and all its pages

landing.site.update

Updates site parameters

landing.site.updateFolder

Updates folder parameters

21.800.0