PHPackages                             kasonyang/smarty4hiano - 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. kasonyang/smarty4hiano

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

kasonyang/smarty4hiano
======================

Hiano上的Smarty驱动

v1.0.2(11y ago)0492PHP

Since Jul 7Pushed 11y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (2)

Smarty4Hiano
============

[](#smarty4hiano)

Hiano的Smarty模板驱动

特性
==

[](#特性)

本库在Smarty基础上新增了3个标签

- link函数

    作用：生成资源文件的链接

    参数：

    `uri`:相对于入口文件(index.php)的路径

    示例：`{{link uri="js/jquery.js"}}`
- url函数

    作用：生成动作的链接

    参数：

    `uri`:string，动作路径，指向一个动作，可以带参数，格式为`[[MODULE/]CONTROLLER/]ACTION[?PARAM1=PARAM_VALUE1[&PARME2=PARAM_VALUE2&..]]`

    `return`:boolean，是否将当前地址以参数的形式追加到目标网址上

    示例：`{{url uri="index"}}` `{{url uri="home/index/index?id=1"}}`
- form块函数

    作用：自动添加隐藏域`_csrftoken`,防止CSRF攻击

    参数：

    支持任何参数，所有参数将直接转换成

    的属性示例：`{{form method="post"}}{{/form}}` 输出html结果：``

模板语法
====

[](#模板语法)

完全遵循Smarty的语法，有关Smarty的语法请浏览

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

4317d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/484b33eb82aa86705437dcc94b596fdcabed15e7e95d2ddb3d5350c92cf1cf4f?d=identicon)[kasonyang](/maintainers/kasonyang)

### Embed Badge

![Health badge](/badges/kasonyang-smarty4hiano/health.svg)

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

###  Alternatives

[modx/revolution

MODX Revolution is a Content Management System

1.4k9.1k12](/packages/modx-revolution)[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)

PHPackages © 2026

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