PHPackages                             insolita/yii2-extview - 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. insolita/yii2-extview

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

insolita/yii2-extview
=====================

Main purpose - quick way for theming external modules with favorite template engine

1.0(10y ago)08MITPHP

Since Jun 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Insolita/yii2-extview)[ Packagist](https://packagist.org/packages/insolita/yii2-extview)[ RSS](/packages/insolita-yii2-extview/feed)WikiDiscussions master Synced 4w ago

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

Simple behavior for set module default view extension
=====================================================

[](#simple-behavior-for-set-module-default-view-extension)

Behavior for set custom view extension on all module, or some actions Main purpose - quick way for theming external modules with favorite template engine

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist insolita/yii2-extview "~1.0"

```

or add

```
"insolita/yii2-extview": "~1.0"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
   'modules'=>[
         'someModule'=>[
               'class'=>'\some\Module',
                'prop'=>'foo',
               'as extview'=>[
                    'class'=>'insolita\extview\ExtviewBehavior',
                     'viewExtension'=>'twig' //it set twig extension for all module controllers

                     //Or with anonymous function with argument $route (equals \yii\base\Action $uniqueId property )
                     'viewExtension'=>function($route){
                           return($route=='some-module/default/index')?'php':'twig';
                      }
                 ]
         ]
   ]
```

And as usual - add module to pathmap in theme config

```
'components' => [
        'view' => [
            'theme' => [
                'basePath' => '@app/themes/mytheme',
                'baseUrl' => '@web/themes/mytheme',
                'pathMap' => [
                    '@app/views' => '@app/themes/mytheme',
                    '@vendor/someModule/views'=>'@app/themes/mytheme/modules/someModule'
                ],
            ],
        ],
    ],
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40f26825f8c130796e3151e6c076721cf5bb222c42148102bb31a341a1a5c789?d=identicon)[Insolita](/maintainers/Insolita)

---

Top Contributors

[![Insolita](https://avatars.githubusercontent.com/u/1847402?v=4)](https://github.com/Insolita "Insolita (5 commits)")

---

Tags

hacktoberfesttwigviewyii2extensionBehaviorsmartytemplate engine

### Embed Badge

![Health badge](/badges/insolita-yii2-extview/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[shoot/shoot

Shoot aims to make providing data to your templates more manageable

40229.9k2](/packages/shoot-shoot)[marekpetras/yii2-calendarview-widget

CalendarView widget for Yii 2 Framework.

2229.6k](/packages/marekpetras-yii2-calendarview-widget)

PHPackages © 2026

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