PHPackages                             elnadrion/tools.twig - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. elnadrion/tools.twig

ActiveLibrary[Templating &amp; Views](/categories/templating)

elnadrion/tools.twig
====================

Модуль подключения шаблонизатора twig к битриксу

3.1.1(1y ago)31.0kMITPHPPHP ^8.2

Since Jan 9Pushed 1y agoCompare

[ Source](https://github.com/Elnadrion/tools.twig)[ Packagist](https://packagist.org/packages/elnadrion/tools.twig)[ RSS](/packages/elnadrion-toolstwig/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (5)Versions (29)Used By (0)

Шаблонизатор twig для 1С-Битрикс
================================

[](#шаблонизатор-twig-для-1с-битрикс)

Данная библиотека позволяет использовать twig шаблоны в 1С Битрикс для компонентов. Обрабатываются файлы шаблонов, имеющие расширение `.twig`. Если создать в директории шаблона компонента файл `template.twig`, то именно он будет использоваться при генерации шаблона.

Установка
---------

[](#установка)

Вы можете установить пакет через composer:

```
composer require elnadrion/tools.twig
```

Простой пример
--------------

[](#простой-пример)

Для наследования шаблона `new_year` компонента `bitrix:news.detail` в twig шаблоне нужно всего-лишь подключить этот шаблон с помощью особого синтаксиса:

```
{% extends "bitrix:news.detail:new_year" %}
```

После чего можно будет переопределить все блоки, которые есть в родительском шаблоне. Подробнее о [синтаксисе](docs/syntax.md) - в документации

Требования
----------

[](#требования)

- Битрикс: &gt;=23.0.0
- PHP: &gt;=8.2

Документация
------------

[](#документация)

- **[Синтаксис подключения шаблонов](docs/syntax.md)**
- **[Доступные переменные и функции внутри шаблонов](docs/twig_extension.md)**
- **[Конфигурирование](docs/configuration.md)**
- **[Работа с кешем](docs/working_with_cache.md)**
- **[Расширение возможностей](docs/extend.md)**
- **[Тонкости интеграции с битриксом](docs/bitrix_pitfalls.md)**

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance41

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 51.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Recently: every ~67 days

Total

28

Last Release

507d ago

Major Versions

0.8.2 → 1.02016-11-05

1.1.3 → 2.0.02022-10-06

2.5.0 → 3.0.02024-05-09

PHP version history (3 changes)0.3PHP &gt;=5.3.0

2.0.0PHP &gt;=7.2.5

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a95d180f355d56b4eec28ea6d68f3a8ef524fa7d921a2f0d56190d7e770f421?d=identicon)[Elnadrion](/maintainers/Elnadrion)

---

Top Contributors

[![Elnadrion](https://avatars.githubusercontent.com/u/33313896?v=4)](https://github.com/Elnadrion "Elnadrion (48 commits)")[![mmjurov](https://avatars.githubusercontent.com/u/802208?v=4)](https://github.com/mmjurov "mmjurov (27 commits)")[![mlavrinenko](https://avatars.githubusercontent.com/u/15840214?v=4)](https://github.com/mlavrinenko "mlavrinenko (11 commits)")[![lozunoff](https://avatars.githubusercontent.com/u/45504224?v=4)](https://github.com/lozunoff "lozunoff (7 commits)")

---

Tags

twigbitrix1С Битриксшаблонизатор

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StyleECS

### Embed Badge

![Health badge](/badges/elnadrion-toolstwig/health.svg)

```
[![Health](https://phpackages.com/badges/elnadrion-toolstwig/health.svg)](https://phpackages.com/packages/elnadrion-toolstwig)
```

###  Alternatives

[timber/timber

Create WordPress themes with beautiful OOP code and the Twig Template Engine

5.7k3.6M127](/packages/timber-timber)[twig/intl-extra

A Twig extension for Intl

36667.2M319](/packages/twig-intl-extra)[symfony/ux-twig-component

Twig components for Symfony

21917.2M304](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1636.5M113](/packages/symfony-ux-live-component)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22919.7M81](/packages/twig-cssinliner-extra)[twig/inky-extra

A Twig extension for the inky email templating engine

16713.2M70](/packages/twig-inky-extra)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
