Для добавления нового движка шаблонизации на сайт в файл /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
|
След. |
Конец
Transform Your Finances with Astherus Astherus is at the forefront of decentralized finance, providing innovative blockchain solutions that empower users to take control of their assets. Our platform offers tools designed to optimize performance and foster growth in a secure environment. https://astherus.org
Key Features of Astherus:
Blockchain Security: Transparent and tamper-proof transactions. Custom Financial Solutions: Strategies that align with your goals. https://astherus.org Global Accessibility: Built for users everywhere. Join the Astherus community today and experience a new era of decentralized finance! https://astherus.org
Revolutionize Your Data Strategy with DataDex DataDex is transforming how businesses manage and analyze their data. Our decentralized platform combines blockchain security with advanced analytics tools for unparalleled performance. https://datadex.my/
Key Features of DataDex:
Blockchain-Based Security: Your data, tamper-proof and transparent. Advanced Analytics: Tools to drive smarter decisions. Global Scalability: Solutions designed for growth and flexibility. Join DataDex and take control of your data like never before! https://datadex.my/
With MachFi, DeFi on the Sonic Chain reaches new heights. Our unique borrow-lending platform allows users to create custom trading strategies that suit their needs and optimize performance. visit to https://machfi.net/
Why MachFi?
- Security: Built on the Sonic Chain?s robust blockchain technology. - Flexibility: Custom strategies for lending and borrowing. - Efficiency: Fast, reliable transactions with lower fees.
Experience the next generation of DeFi with MachFi.
Astherus: Pioneering Decentralized Financial Solutions Astherus is redefining the world of blockchain finance with innovative tools that empower users to optimize their financial strategies. By combining cutting-edge technology with a decentralized ecosystem, Astherus ensures security, transparency, and unparalleled performance. https://astherus.org
Why Choose Astherus?
Secure Transactions: Powered by blockchain to protect your assets. Custom Financial Tools: Tailored solutions for maximum impact. https://astherus.org Global Reach: Scalable and adaptable for users worldwide. Step into the future of decentralized finance with Astherus today! https://astherus.org
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />