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.
- IT / Misc 08.07.21 How to make a free translation for a website without an API, translate documents in Google Translate
- IT / Misc 06.07.21 How to make a subscription button on a website, a subscriber base and automatic mailing
- Food / Misc 06.07.21 How to quickly cook delicious fried pies with potatoes and onions
- IT / Misc 04.07.21 Caching - create, load and reset. Where to store the cache, methods and types of caching
- IT / Database 03.07.21 Custom NoSQL - storing data in files and not only in a database. Storing settings, small data and caching files