Views: 2003 (Data available since 06.02.2017)
Last Modified: 10.10.2012
An unlimited number of different site templates can be used for each site.
When creating a site you can choose three different templates in the site settings and specify the conditions with which they will be applied on the site. After the record is saved, three new fields will be added.
Please bear in mind that after a condition is applied (for example, after the folder is selected, for which the template will be used), you can set the PHP expression
condition. Then, the program code for the specified condition will be shown in the condition field.
For example, after you have selected the template for the /partners/ section, selecting the PHP expression option displays "CSite::InDir('/partners/')".
The PHP expression can be modified in an arbitrary way. You can combine different conditions. For example, set the template to be applied only to a definite folder and only for authorized users:
CSite::InDir('/partners/') && $USER->IsAuthorized()