PHPackages                             fenghuilee/yii2-smartyviewer - 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. fenghuilee/yii2-smartyviewer

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

fenghuilee/yii2-smartyviewer
============================

The Smarty Viewer integration for the Yii framework 2+

1.0.3(11y ago)084MITPHP

Since Jan 14Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fenghuilee/yii2-smartyviewer)[ Packagist](https://packagist.org/packages/fenghuilee/yii2-smartyviewer)[ RSS](/packages/fenghuilee-yii2-smartyviewer/feed)WikiDiscussions master Synced 1mo ago

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

Smarty Extension for Yii 2
==========================

[](#smarty-extension-for-yii-2)

This extension provides a `ViewRender` that would allow you to use Smarty view template engine.

To use this extension, simply add the following code in your application configuration and web controller:

```
xxx/config/main.php
return [
    //....
    'components' => [
        'smarty' => [
            'class' => 'yii\smartyviewer\SmartyViewer',
            //'themeName' => 'basic',
            //'cachePath' => '@runtime/Smarty/cache',
            //'options' => [
            //    'left_delimiter' => '',
            //],
        ],
    ],
];

XxxxController.php
    public function init()
    {
        Yii::$app->smarty->init();
        parent::init();
        //other code
    }
```

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist fenghuilee/yii2-smartyviewer "*"

```

or add

```
"fenghuilee/yii2-smartyviewer": "*"
```

to the require section of your composer.json.

Note that the smarty composer package is distributed using subversion so you may need to install subversion.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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

Total

4

Last Release

4016d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ca8ad30dd0dc9b06d71acd73951c038d88a36383e6f7be0d49ae68ee876e62f?d=identicon)[fenghuilee](/maintainers/fenghuilee)

---

Top Contributors

[![fenghuilee](https://avatars.githubusercontent.com/u/2135391?v=4)](https://github.com/fenghuilee "fenghuilee (1 commits)")

---

Tags

yii2renderersmarty

### Embed Badge

![Health badge](/badges/fenghuilee-yii2-smartyviewer/health.svg)

```
[![Health](https://phpackages.com/badges/fenghuilee-yii2-smartyviewer/health.svg)](https://phpackages.com/packages/fenghuilee-yii2-smartyviewer)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[yiisoft/yii2-smarty

The Smarty integration for the Yii framework

74371.8k15](/packages/yiisoft-yii2-smarty)

PHPackages © 2026

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