-
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
Redefinition of Incoming Variables
Lesson 134 out of 253
Each component has a set of variables in which it receives codes or other attributes of requested data from the outside. For example, the component bitrix:catalog.section has variables IBLOCK_ID and SECTION_ID in which it receives and processes codes of the catalog and the product group, accordingly.
All components that form part of a composite component must have a single set of variables. For example, the composite component bitrix:catalog and all simple components (bitrix:catalog.list, bitrix:catalog.section etc.), under its control work with the variables IBLOCK_ID, SECTION_ID, ELEMENT_ID, and others.
If the developer wants to redefine the component variables when placing a composite component on a page, the developer must set up the parameter VARIABLE_ALIASES among the incoming parameters of the component.
When connecting a component in the SEF mode, this parameter must look as follows:
"VARIABLE_ALIASES" => array( "list" => array(), "section" => array( "IBLOCK_ID" => "BID", "SECTION_ID" => "ID" ), "element" => array( "SECTION_ID" => "SID", "ELEMENT_ID" => "ID" ), )
Here, array codes are consistent with the codes in the path template array. For each path, their own redefinitions of variables can be set up.
When connecting a component not in the SEF mode, this parameter must be:
"VARIABLE_ALIASES" => array( "IBLOCK_ID" => "BID", "SECTION_ID" => "GID", "ELEMENT_ID" => "ID", )
Example No. 1:
Let us assume that the component bitrix:catalog connected in the file /fld/cat.php must work with the paths:/catalog/index.php
– for a list of catalogs,
/catalog/section/group_code.php?ID=catalogue_code
– for a group of goods,
/catalog/element/goods_code.php?ID=group_code
– for detailed information about an item of goods.
The following parameters must be set up in the incoming parameters for component connection:
"SEF_MODE" => "Y", "SEF_FOLDER" => "/catalog/", "SEF_URL_TEMPLATES" => array( "list" => "index.php", "section" => "section/#SECTION_ID#.php?ID=#IBLOCK_ID#", "element" => "element/#ELEMENT_ID#.php?ID=#SECTION_ID#" ), "VARIABLE_ALIASES" => array( "list" => array(), "section" => array( "IBLOCK_ID" => "ID"), "element" => array( "SECTION_ID" => "ID",),
Example No. 2:
Let us assume that the component bitrix:catalog connected in the file /fld/cat.php
must work with the paths
/fld/cat.php
– for a list of catalogs,
/fld/cat.php?BID=catalogue_code&SID=group_code
– for a group of goods,
/fld/cat.php?ID=goods_code&SID=group_code
– for detailed information about an item of goods.
The following parameters must be set up in the incoming parameters for a component connection:
"SEF_MODE" => "N", "VARIABLE_ALIASES" => array( "IBLOCK_ID" => "BID", "SECTION_ID" => "SID", "ELEMENT_ID" => "ID", ),