-
What is Bitrix Framework?
-
Production Architecture
-
Production Architecture
-
Structure of files
-
Access Rights
-
A Site in Terms of Bitrix Framework
-
-
Processing Techniques
-
Core D7
-
Modules
-
Name Spaces
-
Core Parameter Setup
-
Exceptions
-
Events
-
Code Writing Rules
-
Applications and Context
-
Errors
-
ORM
-
API
-
Highloadblock
-
-
Design Integration
-
Using Access Rights
-
Site Design Template
-
Using message files for localization
-
Editable areas
-
Navigation tools
-
Advertisement
-
Managing Template Service Data
-
Editing Service Areas
-
Managing Page Encoding
-
Managing Document Header
-
Managing Metadata Values
-
CSS management
-
-
Setup of External Appearance of Additional Elements of the Site Design
-
-
Information Blocks
-
Working with Infoblocks Using Standard Means
-
Infoblocks 2.0
-
Action Plan in Case of Problems
-
Sorting
-
Work with Infoblocks through API
-
Examples
-
-
Components
-
Simple and composite components
-
Location of a Component in the System and Its Connection
-
Component Structure
-
Composite Component Structure
-
Component Description
-
Component Parameters
-
Component Templates
-
Support of Component Classes
-
result_modifier.php
-
component_epilog.php
-
Operation of a Composite Component in a SEF Mode
-
Frequent Errors
-
Component Caching
-
Working with Components
-
Template Customization
-
Component Customization
-
Creating Components
-
Additional Methods
-
Redefinition of Incoming Variables
-
User-Defined Templating Engines
-
Operation of a Composite Component in SEF Mode
-
Ways of Data Transmission among Components
-
A Simple Example of a Component Creation
-
Component Creation Example
-
TinyMCE Visual Editor Integration Component
-
Caching in own components
-
-
CUSTOM Parameter Type
-
More examples
-
Errors When Working with Components
-
-
-
Modules
-
Programming in Bitrix Framework
-
Golden Rules
-
The file init.php
-
UTF-8 or a National Encoding?
-
Working with Databases
-
Setup of SEF for URLs
-
Language Files
-
JS Library
-
Interface of the Control Panel Toolbar as Seen by a Developer
-
Some Theory
-
Performance
-
Security
-
Examples, tricks, and advice
-
Custom Fields
-
Gadgets
-
Project Testing
-
Project Quality Control
-
Debugging Web Applications
-
-
Push and Pull module
-
Version Control System
-
-
Multiple Sites
-
Introduction
-
Use of Multiple Site Version
-
How many sites can I create?
-
Language versions (mirrors)
-
Sharing visitors between sites
-
Configuring the multisite system
-
Working with the Data in a Multiple Site Configuration
-
Frequent Questions Arising When Working with a Multiple Site Configuration
-
-
Business Processes for Developer
-
Template of a Business Process
-
Business Process
-
Activities
-
Executing a business process activity using API
-
Arbitrary PHP Code in a Business Process
-
-
Additional Information and Examples
Website Creation and Setup
Lesson 218 out of 253
Before setting up the system to make it work with several sites you have to create a new site. It is made in the Administrative Section on the page Websites (Control Panel > Settings > System settings > Websites > Websites). At the time of adding an entry about the new site to the site table, please indicate the following parameters:
- ID – a 2-digit combination, e.g. lt, en, de, s1, s2 etc.
- Name – an arbitrary name of the website; together with the site ID it is used in different administrative forms to indicate binding to a specific site.
- Domain – domain names which correspond to this site are indicated.
Domain names are set in a separate line (one name per line).
Each domain name is a «mask», i.e. may include subdomains. E.g., the following sites can be selected by the name site.com: www.site.com or www1.site.com, and my-site.com. In this case site.com is partially included in all three domain names.
In version 11 or later, the use of Cyrillic domain names is possible.
Be careful when indicating the domain names of the site. In case the site uses cookies and domain names are indicated incorrectly, then while the user sees the pages of your site, the other site (which domain name is indicated by error) will also be accessed.
If the site which domain name is indicated by error provides for pop-up windows, visitors of your site will also see these pop-up windows.
For example, if for the site http://demo.bitrixsoft.com/ instead of demo.bitrixsoft.com demo.bitirxsoft.com (error in the position of the second i) is typed, the following code will be added to the page code of the site http://demo.bitrixsoft.com/:
<IMG style="width:0px; height:0px; border: 0px"
src="http://demo.bitirxsoft.com/bitrix/spread.php?
s=QklUUklYX1NNX0dVRVNUX0lEATk5NDgBMTE5MTU5NDU0OAEvAQECQklUUkl
YX1NNX0xBU1RfVklTSVQBMTAuMTAuMjAwNiAxODoyOTowOAExMTkxNTk0NTQ4AS8BAQI%3D&
k=9e8de698c64709edf2e76202279ce889"></IMG>
As a result, visitors of the site http://demo.bitrixsoft.com/ will be shown pop-up windows of the site with the domain name demo.bitirxsoft.com.
In order to avoid problems in case the domain names of different sites partially coincide, use site sorting index. In this case, when a site is selected by domain name the sorting index will be compared and the site with the lesser index value will be used.
If the sorting index value coincides, the verification will be made according to the length of the domain name.
- Site folder – a folder is set where information content of the site, its sections and pages are located.
The indicated value is used as a reference level to build logical and physical structure in the structure management module.
- Sorting index - a numeric parameter is indicated which determines the order of the site in the general list.
In a number of cases, when adding a second site, the templates indicated for such second site may become inapplicable. The problem is caused by a special mechanism of site selection. Thus, if the name of the second site (e.g., test.site.org) contains the name of the first site (site.org), and the sorting value of the second site is bigger than that of the first site, the templates will be applied to the second site from the first. When using such names, indicate a smaller sorting value for the second site compared with that of the first site.
In the Parameters sections, the language settings of the site are determined. Also, the following values are set:
- Website name – an arbitrary name of the website which can be used in mail templates. If the value is not set in the site parameters, the value of the same name parameter from the kernel module settings will be used.
- Server URL – the set server address will be used when forming mail messages based on the templates. The address will be indicated without http://. If the value is not set in site settings, the value of the same name from the kernel module settings will be used.
- Default Email address – an email address will be set which will be used as a macros value DEFAULT_EMAIL_FROM when forming mail messages for each server. If this field is not completed for the site, the template will use the mail address indicated in the settings of the kernel module.
- Path to the web server root folder of this site – a full path to the folder for which the variable DOCUMENT_ROOT is set up for this site shall be indicated. In order to facilitate the insertion of the full path into this filed, the link «insert current» can be used. In this case, a full path to files of the current site on the server will be automatically inserted.
This possibility of inserting the current path should be used only when you actually are on the website for which the value is being inserted.
For example, while in the administrative section, when coming from site1.com/bitrix/admin the path value exactly for this site will be inserted:
/home/public_html/site1/
In this case, the following path value will be inserted:
/home/public_html/site2/
- Create Email templates – an option to create or bind mail templates; it is available only when creating a new site:
- do not create – no site templates will be created;
- link to existing site templates – a possibility is offered to link the site to the current templates for one of the sites;
- copy from site templates – site templates will be copied for the indicated site from the relevant templates for the selected site.