PHPackages                             axguowen/think-dedetpl - 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. axguowen/think-dedetpl

ActiveLibrary

axguowen/think-dedetpl
======================

Dedetpl package for ThinkPHP

0361PHP

Since Apr 1Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

ThinkPHP织梦模板引擎
==============

[](#thinkphp织梦模板引擎)

织梦模板引擎 For ThinkPHP

主要功能：

支持织梦标签渲染页面

安装
--

[](#安装)

```
composer require axguowen/think-dedetpl
```

用法示例
----

[](#用法示例)

本扩展不能单独使用，依赖ThinkPHP6.0+

首先配置config目录下的dedetpl.php配置文件，然后可以按照下面的用法使用。

简单使用

```
// 实例化引擎
$dedeTemplate = new \think\Dedetpl();
// 模板路径
$templatePath = $this->app->getRootPath() . '/public/views/default.htm';
// 生成静态
$dedeTemplate->fetch($templatePath, ['title' => '标题', 'name' => '测试']);
```

配置说明
----

[](#配置说明)

```
// 短信配置
return [
    // 模板路径
    'view_path'             => '',
    // 模板文件后缀
    'view_suffix'           => 'htm',
    // 模板文件分隔符
    'view_depr'             => DIRECTORY_SEPARATOR,
    // 模板引擎禁用函数列表
    'deny_func_list'        => ['echo', 'exit'],
    // 默认模板引擎是否禁用PHP原生代码
    'deny_runphp'           => false,
    // 标签命名空间
    'tag_namespace'         => 'itzjj',
    // 标签开始标记
    'tag_begin'             => '{',
    // 标签结束标记
    'tag_end'               => '}',
    // 是否去除模板文件里面的html空格与换行
    'strip_space'           => false,
    // 标签名称最大长度
    'tag_maxlen'            => 64,
    // 属性源码最大长度
    'attr_maxlen'           => 1024,
    // 标签名称和属性不区分大小写
    'insensitive'           => true,
    // 模板字符串过滤
    'replace_string'        => [],
    // 标签库列表
    'taglibs' => [

    ],
];
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bb2b3388238042a25cf42dc44e5ff84adc241510354abae9e91573556753205?d=identicon)[axguowen](/maintainers/axguowen)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/axguowen-think-dedetpl/health.svg)

```
[![Health](https://phpackages.com/badges/axguowen-think-dedetpl/health.svg)](https://phpackages.com/packages/axguowen-think-dedetpl)
```

PHPackages © 2026

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