定制 x-bird/smarty 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

x-bird/smarty

最新稳定版本:1.4

Composer 安装命令:

composer require x-bird/smarty

包简介

改自latrell/smarty,增加配置项,让其支持fis smarty插件的配置项.

README 文档

README

安装

composer require x-bird/smarty

配置

  • config/app.php 文件中配置:
    'providers' => array(
        // ...
        Xbird\Smarty\SmartyServiceProvider::class,
    )
  • 执行发布配置文件:php artisan vendor:publish --provider="Xbird\Smarty\SmartyServiceProvider" --tag=config --tag=plugins

使用

  • 加入providers:
  • 假设有模板文件views/blog/post.tpl,那controller中是这样渲染的,View::make('blog.post')
  • 关于 {include}{extends} 标签的参数传递, 需要使用全路径的写法, 例如: {extends file="blog/post.tpl"}

配置项解释

  • 模板放置路径:template_path
  • 模板缓存路径:cache_path
  • 模板编译路径:compile_path
  • fis3 产出的namespace-map.json 放置路径:configs_paths

统计信息

  • 总下载量: 495
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-11