PHPackages                             dragonbuf/nui - 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. dragonbuf/nui

ActiveLibrary

dragonbuf/nui
=============

nui

v1.0.2(5y ago)189JavaScript

Since May 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Dragonbuf/nui)[ Packagist](https://packagist.org/packages/dragonbuf/nui)[ RSS](/packages/dragonbuf-nui/feed)WikiDiscussions master Synced 3d ago

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

备注
--

[](#备注)

```
yii2 + smarty 通用的后端管理框架。

```

---

Usage
-----

[](#usage)

```
composer install dragonbuf/nui

```

---

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

```
return [
    //....
    'components' => [
        'view' => [
            'renderers' => [
                'tpl' => [
                    'class' => 'nuiYii\Nui',
                    //'cachePath' => '@runtime/Smarty/cache',
                    'options' => [
                        "left_delimiter" => "%{",
                        'caching' => false,
                        'compile_check' => true,
                    ],
                    'menu' => [
                        [
                            'path' => '/a',
                            'icon' => '',
                            'name' => 'a',
                            'child' => [
                                [
                                    'path' => '/b',
                                    'icon' => '',
                                    'name' => 'b',
                                ],
                                [
                                    'path' => '/c',
                                    'icon' => '',
                                    'name' => 'c',
                                ],
                                [
                                    'path' => '/d',
                                    'icon' => '',
                                    'name' => 'd',
                                ]
                            ]
                        ],
                        [
                            'path' => '/e',
                            'icon' => '',
                            'name' => 'e',
                            'child' => [
                                [
                                    'path' => '/f',
                                    'icon' => '',
                                    'name' => 'f',
                                ],
                            ]
                        ],
                        [
                            'path' => '/signer',
                            'icon' => '',
                            'name' => '个人中心',
                            'child' => [
                            ]
                        ]
                    ],
                    'nuiDefaultName' => 'nui',
                    'userInfo' => '/user-info',//个人中心
                    'setting' => '/setting',//设置
                    'logout' => '/site/logout'//退出
                ],
            ],
    ],
];
```

SiteController

```
public $layout = false
public function actionIndex()
{
    return $this->render('index.tpl');
}

```

index.tpl

```
%{extends "_layout/layout.tpl"}

%{block name="page-title"}main%{/block}

%{block name="page-action"}
    DELETE
    %{/block}

        %{block name="main"}

            you can begin your view in this

        %{/block}

```

#### notice

[](#notice)

you can set flash message in Controller,nui will show error or success message in flash

```
\Yii::$app->getSession()->setFlash('error', 'This is the message');

\Yii::$app->getSession()->setFlash('success', 'This is the message');

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

2183d ago

### Community

Maintainers

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

---

Top Contributors

[![Dragonbuf](https://avatars.githubusercontent.com/u/16714935?v=4)](https://github.com/Dragonbuf "Dragonbuf (9 commits)")

---

Tags

nuismartyyii2yii2-cms

### Embed Badge

![Health badge](/badges/dragonbuf-nui/health.svg)

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

PHPackages © 2026

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