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(7y ago)127MITPHPPHP ^7.0

Since Apr 3Pushed 7y ago1 watchersCompare

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

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 54% 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

2892d ago

Major Versions

v1.2.0 → v2.0.32018-04-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/088826e55531cb98a7cca78db30c59555635cfac9c7cd3c21ca8f7edf10b8229?d=identicon)[kolserdav](/maintainers/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

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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