Creating a Bitrix24 site programmatically
1C-Bitrix recently introduced a new software product - Bitrix24 sites . Now anyone can create their own website in just a few minutes by selecting and placing ready-made blocks. All of this is reminiscent of existing site creation services - site builders . But Bitrix24 Sites is a more professional tool with much wider possibilities. This includes: integration with a CRM system, rich functionality of REST API , ease of working with the service, etc.
The choice of blocks is currently sufficient to create almost any site. In addition, blocks can be easily created by yourself using the API. But what can I say, using the API, you can create a completely entire site, and there are more opportunities than creating a site through the interface. To begin with, it is worth developing a site in the interface, then you can transfer the creation process to code. In order to migrate to the code, you need to add an application that will make API requests , thereby creating the site.You can add an application by going to your Bitrix24 portal and selecting the "Applications" item in the left menu. Then click "Add Application" and select "Personal Use". Fill in the required fields, set the required rights (minimum rights are “Sites” and “Users”), then provide links to your server where the code will run or download the application as a ZIP archive.
Then you need to add a page, call the landing.landing.add method.
When the page is added, add the first block to it by calling the landing.landing.addblock method.
Everything, the minimum actions have been completed, now it remains to remember to apply the changes, call the method to publish the page: landing.landing.publication . After that, you can call other necessary methods to create a fully functional site.The screenshots also show other methods, a complete list and description of all methods is available on the official documentation page "Битрикс24 сайты". The site created programmatically will appear in the "Sites" section of your Bitrix24 portal , you can work with it as if you had created it manually. Creating a site programmatically may be useful for introducing such functionality into Bitrix24 applications or third-party services. The Bitrix24 Sites service is young and constantly evolving, it is a rather promising direction of the company's development.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 09.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes
- 07.07.22IT / Safety How to protect PHP, JS, HTML, CSS source code - obfuscation, minification, compression and encryption
- 06.07.22IT / Safety Connection not secure, problem with Lets Encrypt - how to fix expired 09/30/2021 DST Root CA X3, remove it manually and install ISRG Root X1. Example on MS Windows 7
- 08.07.21IT / Misc How to make a free translation for a website without an API, translate documents in Google Translate