Views: 11531
Last Modified: 14.07.2014

The site template is a group of PHP and CSS files (<file_name>.css). Templates are used for public section layout. Site template defines:

  • site design (layout, using sets of CSS and etc.);
  • menu types;
  • advertising areas;
  • include and editable areas;
  • occurrence of authorization or subscription forms in site design, etc.

All templates are stored in directory /bitrix/templates/. Files that comprise the template are stored in subdirectory named by the template identifier (for example, /bitrix/templates/demo/ or /bitrix/templates/template1/).

A common site design usually includes three main parts:

  • (1) Topmost section (header);
  • (2) Main section that is used to display the site presentation and information content, components or the code;
  • (3) Bottom section (footer).

Header - is the top part of the design. As a rule, it includes the top and left part of the design with static information (logo, slogan, etc.), top horizontal menu, and left menu (if they are stipulated by design). Dynamic informational materials may be included. It is stored in a separate file .../<template_identifier>/header.php.

Work area - is the page working area where the proper informational materials of the site are located. Work area comprises all the documents created by users that are stored in the files <document_name>.php in the relevant site folders.

Footer - is the bottom part of the design containing static information (as a rule: contact details, information about author and owner of the site, etc.), low horizontal menu, and right menu (if they are stipulated by design). Informational materials may be included. It is stored in a separate file .../<template_identifier>/footer.php.

Connection of Design Parts

Assembling of typical page is implemented by uniting header and footer parts of the site design with work (main) area. In the general case a site page has the following structure:

$APPLICATION->SetTitle("Bitrix Site Manager");

Main part


Note: In addition to static information, the following items may be located in the template and work area:
  • Visual components;
  • Include areas;
  • Arbitrary PHP code.

These site elements are intended for the display of dynamic information.

Courses developed by Bitrix24