Для добавления нового движка шаблонизации на сайт в файл /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
|
След. |
Конец
Автоматизация бизнеса легко и просто с Microinvest! Ищете программу для автоматизации магазина, кафе или ресторана? Microinvest предлагает простую и надежную программу с готовыми драйверами для оборудования. Быстрое обучение, большой выбор отчетов и полный функционал! Прямые поставки оборудования (сканеры, принтеры, весы, моноблоки) из Китая, Европы, России. Гарантируем качество: собственный сервисный центр и расширенная гарантия. Начните автоматизацию уже сегодня на https://microinvest.kz/ !
Hello! The psychology of online gaming explores how players seek rewards and emotional fulfillment from their virtual interactions. Why people play online games is largely due to the desire for competition, socialization, and achievement. Seasonal eating provides numerous benefits, such as better digestion and improved immune function, when your diet is aligned with seasonal produce. The influence of online games on relationships is evident, as players often form meaningful bonds through teamwork and collaboration. Time management for business leaders helps to improve focus and ensure that both work and personal responsibilities are effectively managed. More information here - п»їhttps://kareprp.com/ top destinations for spiritual retreats why seasonal eating matters advantages of a seasonal diet time management for business leaders
Hello! Online gaming taps into the psychology of human interaction by offering players rewards, challenges, and social connection. Why people play online games is often motivated by the need for excitement, entertainment, and community. Seasonal eating provides health benefits such as improved immunity and a more balanced diet when you align with the seasons. Digital games influence relationships by allowing people to connect with others and build social bonds through cooperative play. Time management for business leaders is essential for achieving success in both personal and professional life. More information here - п»їhttps://kareprp.com/ financial planning in the gig economy challenges in managing remote teams pet-friendly travel destinations pet-friendly travel planning
Hey everyone! If you’re as obsessed with cinnamon as I am, you’ve probably wondered about the different types of cinnamon and how to use them. It turns out, not all cinnamon is created equal, and learning about the varieties can really elevate your cooking, baking, and even health game.
Let’s start with the basics. The two most common types are Ceylon cinnamon (known as “true cinnamon”) and Cassia cinnamon. Both have their unique flavor profiles and uses, but they also differ in health benefits. If you’re asking, "Which type of cinnamon is healthiest?" Ceylon wins the crown. It contains lower levels of coumarin, a compound that can be harmful in large amounts. This makes it a better choice if you use cinnamon daily, especially for health purposes.
Cassia cinnamon, on the other hand, is more affordable and has a stronger, spicier flavor. It’s perfect for recipes like cinnamon rolls or hearty stews where you want a bold kick. Meanwhile, Ceylon’s milder, sweeter taste makes it ideal for teas, desserts, or even a sprinkle on your oatmeal.
I also love experimenting with cinnamon powder, which is super versatile. It’s a pantry staple for spicing up coffee, smoothies, or baked goods, but did you know it’s also amazing in savory dishes like curries and roasted vegetables?
Understanding the different types of cinnamon can completely transform how you use this spice. If you’re as intrigued as I was, dive into blogs that explore the history, benefits, and creative uses of cinnamon. Trust me, it’s worth geeking out over this ancient superfood.
Good day! The psychology of online gaming delves into how players are motivated by emotional rewards, social connections, and competition. Why people play online games is often because they enjoy the fun, challenge, and sense of accomplishment they provide. Seasonal eating offers various health benefits, including enhanced immunity and better digestion, by consuming foods that align with the changing seasons. Online games influence relationships by providing a platform for players to work together, socialize, and form bonds. Time management for business leaders is crucial to ensure productivity and maintain a healthy work-life balance. More information here - https://lenafaure.com food trends for healthy living planning pet-friendly vacations adapting to the gig economy lifestyle reviving old video games
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />