PHPackages                             gkralik/laminas-smarty-module - 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. gkralik/laminas-smarty-module

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

gkralik/laminas-smarty-module
=============================

Laminas module providing a Smarty rendering strategy

v4.0.0(1y ago)0283↓50%Apache-2.0PHPPHP ^8.1

Since Mar 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gkralik/laminas-smarty-module)[ Packagist](https://packagist.org/packages/gkralik/laminas-smarty-module)[ Docs](https://github.com/gkralik/laminas-smarty-module)[ RSS](/packages/gkralik-laminas-smarty-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

laminas-smarty-module
=====================

[](#laminas-smarty-module)

This is a module for integrating the [Smarty](http://www.smarty.net) template engine with [Laminas](https://getlaminas.org/).

Based on [gkralik/zf3-smarty-module](https://github.com/gkralik/zf3-smarty-module).

Installation with Composer
--------------------------

[](#installation-with-composer)

Installing via [Composer](http://getcomposer.org) is the only supported method.

```
$ composer require gkralik/laminas-smarty-module:^4.0.0
```

Add the module to your applications configuration to enable it:

```
'modules' => [
  'GKralik\SmartyModule',
  // ...
]
```

Usage
-----

[](#usage)

To enable the Smarty rendering strategy, it must be registered as a strategy with the Laminas ViewManager (eg. in the application's default module configuration):

```
use GKralik\SmartyModule\Strategy\SmartyStrategy;

return [
    // ...
    'view_manager' => [
        'strategies' => [
            /* Register view strategy with the view manager (REQUIRED). */
            SmartyStrategy::class,
        ],
    ],
];
```

**Important:** As of version *4.0.0*, this is no longer done automatically.

Configuration
-------------

[](#configuration)

For information on supported options refer to the [module config file](config/module.config.php).

There is also a [sample configuration file](config/laminas-smarty-module.config.php.dist) with all available configuration options.

You can set options for the Smarty engine under the `smarty_options` configuration key (eg `force_compile`, etc).

Pay attention to the `compile_dir` and `cache_dir` keys. Smarty needs write access to the directories specified there.

Documentation
-------------

[](#documentation)

### Using Zend Framework view helpers

[](#using-zend-framework-view-helpers)

Using view helpers of Laminas is supported. Just call the view helper as you would do in a PHTML template:

```
{$this->doctype()}

{$this->basePath('some/path')}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance43

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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 ~170 days

Total

3

Last Release

455d ago

Major Versions

v3.1.0 → v4.0.02025-02-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/e0375d8dd13403dbc0e90d0087d1defc424fcaa8c17612290f776a1766fd30a3?d=identicon)[gkralik](/maintainers/gkralik)

---

Top Contributors

[![gkralik](https://avatars.githubusercontent.com/u/4949303?v=4)](https://github.com/gkralik "gkralik (14 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gkralik-laminas-smarty-module/health.svg)

```
[![Health](https://phpackages.com/badges/gkralik-laminas-smarty-module/health.svg)](https://phpackages.com/packages/gkralik-laminas-smarty-module)
```

###  Alternatives

[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

87401.6k](/packages/ytake-laravel-smarty)[noiselabs/smarty-bundle

This Symfony bundle provides integration for the Smarty3 template engine.

53194.4k1](/packages/noiselabs-smarty-bundle)[kokspflanze/zfc-twig

Laminas/Zend Framework Module that provides a Twig rendering strategy and extensions to render actions or trigger events from your templates

15299.3k4](/packages/kokspflanze-zfc-twig)[oxcom/zend-twig

ZendTwig is a module that integrates the Twig template engine with Zend Framework 3.

19109.7k](/packages/oxcom-zend-twig)

PHPackages © 2026

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