Для добавления нового движка шаблонизации на сайт в файл /bitrix/php_interface/init.php необходимо добавить следующее:
1. Глобальную переменную $arCustomTemplateEngines, которая содержит ассоциативный массив, каждый элемент которого имеет вид:
"код_шаблонизатора" => array(
"templateExt" => array("расширение1"[, "расширение2"...]),
"function" => "имя_функции_подключения_движка"
)
где:
"код_шаблонизатора" - произвольное уникальное в рамках сайта слово;
"расширениеN" - расширение файла, который должен обрабатываться этим движком шаблонизации;
"имя_функции_подключения_движка" - имя функции, которая будет вызываться, если шаблон компонента имеет указанное расширение.
2. Функцию подключения движков:
function имя_функции_подключения_движка($templateFile, $arResult, $arParams, $arLangMessages, $templateFolder, $parentTemplateFolder, $template),
где:
$templateFile – путь к файлу шаблона относительно корня сайта,
$arResult – массив результатов работы компонента,
$arParams – массив входных параметров компонента,
$arLangMessages – массив языковых сообщений (переводов) шаблона,
$templateFolder – путь к папке шаблона относительно корня сайта (если шаблон лежит не в
папке, то эта переменная пуста),
$parentTemplateFolder - путь относительно корня сайта к папке шаблона комплексного
компонента, в составе которого подключается данный компонент (если компонент
подключается самостоятельно, то эта переменная пуста),
$template – объект шаблона.
Рассмотрим подключение движков на конкретных примерах.
Страница
1 - 1 из 3
Начало | Пред. |
123
|
След. |
Конец
1xBet prides itself on its comprehensive sportsbook, which encompasses a vast range of sports from all corners of the globe. Whether you have a passion for popular international sports such as football, basketball, tennis, cricket, or you prefer more niche sports, 1xBet has something for everyone. You can place bets on both pre-match and live events, taking advantage of competitive odds and a diverse selection of betting options to enhance your chances of winning.
1xbet Promo Code Exclusive Vip Bonus Up To €/$130
https://agriness.com/articles/1xbet_promo_code_420.html Promo code for 1xBet, use this combination to increase your welcome bonus up to 100% on an amount reaching $/€130 for registration. These funds are available to all new players who have already created an account or are planning to do so. The bonus requires wagering, and it must be done in the sports section by placing bets with odds of at least 1.4 and a fivefold turnover. You have 30 days to use the code before it expires at the end of 2025. 1xBet Promo Code 2025 - this is a huge bonus of up to $1950 for the casino and 150 free spins on slots. An exclusive offer for new players aged 18 and above. To activate the code, you need to make a deposit of $10. The second and subsequent deposits must be at least $15. You can participate in this promotion until the end of 2025.
1xBet prides itself on its comprehensive sportsbook, which encompasses a vast range of sports from all corners of the globe. Whether you have a passion for popular international sports such as football, basketball, tennis, cricket, or you prefer more niche sports, 1xBet has something for everyone. You can place bets on both pre-match and live events, taking advantage of competitive odds and a diverse selection of betting options to enhance your chances of winning.
1xbet Promo Code Free Welcome Bonus €/$130
http://ourmetals.com/includes/pages/1xbet_free_bet_promo_code_2020.html Promo code for 1xBet, use this combination to increase your welcome bonus up to 100% on an amount reaching $/€130 for registration. These funds are available to all new players who have already created an account or are planning to do so. The bonus requires wagering, and it must be done in the sports section by placing bets with odds of at least 1.4 and a fivefold turnover. You have 30 days to use the code before it expires at the end of 2025. 1xBet Promo Code 2025 - this is a huge bonus of up to $1950 for the casino and 150 free spins on slots. An exclusive offer for new players aged 18 and above. To activate the code, you need to make a deposit of $10. The second and subsequent deposits must be at least $15. You can participate in this promotion until the end of 2025.
1xBet prides itself on its comprehensive sportsbook, which encompasses a vast range of sports from all corners of the globe. Whether you have a passion for popular international sports such as football, basketball, tennis, cricket, or you prefer more niche sports, 1xBet has something for everyone. You can place bets on both pre-match and live events, taking advantage of competitive odds and a diverse selection of betting options to enhance your chances of winning.
1xbet Promo Code Offer Bonus Up To €/$130
http://ourmetals.com/includes/pages/1xbet_free_bet_promo_code_2020.html Promo code for 1xBet, use this combination to increase your welcome bonus up to 100% on an amount reaching $/€130 for registration. These funds are available to all new players who have already created an account or are planning to do so. The bonus requires wagering, and it must be done in the sports section by placing bets with odds of at least 1.4 and a fivefold turnover. You have 30 days to use the code before it expires at the end of 2025. 1xBet Promo Code 2025 - this is a huge bonus of up to $1950 for the casino and 150 free spins on slots. An exclusive offer for new players aged 18 and above. To activate the code, you need to make a deposit of $10. The second and subsequent deposits must be at least $15. You can participate in this promotion until the end of 2025.
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />