PHPackages                             kolserdav/templater - 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. kolserdav/templater

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

kolserdav/templater
===================

Simple templater

v2.0.11(8y ago)127MITPHPPHP ^7.0

Since Apr 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kolserdav/templater)[ Packagist](https://packagist.org/packages/kolserdav/templater)[ RSS](/packages/kolserdav-templater/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (14)Used By (0)

**Simple template engine**
This component has the ability to cache on the client side, with the availability of visited pages in offline.

*Installation*

~$ `composer require kolserdav/templater`

*Dependencies*

`"php" : "^7.0"`
`"kolserdav/router": "^0.2.0"`
\--dev `"phpunit" : "^7.0"`

*package.json*` "dependencies": { "ajaxsim": "^1.0.0", "dist-cookie": "^0.0.7" }, "devDependencies": { "webpack": "^4.5.0"`

Component templater use kolserdav/router module, and working project must be used single point access. For module kolserdav/router settings can be read on: .

*Using in template*

At the moment the following structures are supported

```
{{ variable }}  //some variable need sent to render(['variable' => 'value'],[])

{% field %}  //HTML block field, need sent to render([],['field' => 'path/patch.file.html'])

{% for value in array %}{{ value }}{% endfor %} //for in, need sent to render(['for_array' => [1,2,3])

```

To enable syntax highlighting in your IDE, you can use the .twig extension.

Construction for in supported using with tags. For example:

```
{% for value in array %}{{ value }}{% endfor %}

```

Bud for correct work name 'value' must be unique for one page. And it is written in one line. For example

```
{% for value1 in array_one %}{{ value1 }}{% endfor %}

{% for value2 in array_two %}{{ value2 }}{% endfor %}

```

*Using*

For use this module need some dependencies write in your index file or controller file...

Optional (if you need the cache of pages)

```
use Avir\Templater\Module\Config;

$config = new Config();
$config->setConfig([
    'cache' => '/path/cache/catalog/+{pages}' //default : false  {pages} - auto create catalog
    'userCache' => '/path/usrCache/catalog/+{users}' //default : false {users} - auto create catalog
]);
```

Require (to include template)

```
use Avir\Templater\Module\Render;

$obj = new Render('/path/template/catalog', '/template.file');
$obj->render(
    [
        'first_variabe' => 'string', //{{ key }}
        'second_variable' => 111,
        'for_array1' => [1,2,3,4], //arrays need have 'for_' before
        'for_array2' => [4,3,2,1]
    ],
    [
        'field1' => 'patch.file', //patches repository /template-catalog/views
        'field2' => 'path/patch.file' //patches repository /template-catalog/views/path
        ]);
```

It works.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Recently: every ~13 days

Total

12

Last Release

2940d ago

Major Versions

v1.2.0 → v2.0.32018-04-16

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9353076?v=4)[Sergei Davidovich Kolmiller](/maintainers/kolserdav)[@kolserdav](https://github.com/kolserdav)

---

Top Contributors

[![kolserdav](https://avatars.githubusercontent.com/u/9353076?v=4)](https://github.com/kolserdav "kolserdav (62 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kolserdav-templater/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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