Yii-Rain-TPL-View-Renderer

Rain TPL Yii View Renderer

  • 所有者: VinceG/Yii-Rain-TPL-View-Renderer
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Rain TPL Yii View Renderer

Rain TPL Yii View Renderer

The easy and fast template engine for PHP. Rain.TPL makes application easier to create & enables designers/developers to work better together.

Requirements

  • PHP 5
  • Yii 1.1.10 (Tested on 1.1.10 but should work on older versions as well)

Installation

  1. Download or Clone the files
  2. Extract into the extensions folder
  3. Edit the application config file and add the following array under the 'components' array:
'viewRenderer'=>array(
  'class'=>'application.extensions.RainTPLViewRenderer',
),

Configure

The available options you can set for this view renderer are:

'viewRenderer'=>array(
	'class'=>'application.extensions.RainTPLViewRenderer',
	// File extension used for views
	'fileExtension' => '.tpl',
	// is the template directory
	'tpl_dir' => null,
	// where it save compiled templates and cache
	'cache_dir' => null,
	// the absolute base url of your application (eg. http://www.raintpl.com)	
	'base_url' => null,
	// enable/disable the path replace	
	'path_replace' => false,
	// configure what to replace	
	'path_replace_list' => array(),
	//  configure what command are not allowed	
	'black_list' => array(),
	// enable/disable the control if template was modified by the last compiling	
	'check_template_update' => true,
	// enable/disable the use of php tags in your template
	'php_enabled' => false,
	// Use the latest beta version for rain tpl 3
	'useRainBeta' => false,
	// Will not cache templates
	'debug' => false,
	// Auto escape variables
	'auto_escape' => false,
),

Usage

To render a view you would call the render method the same way

$this->render('someview', $params);

Template Syntax Examples

For more info see Documentation

Authors

Vincent Gabriel http://vadimg.com

主要指標

概覽
名稱與所有者VinceG/Yii-Rain-TPL-View-Renderer
主編程語言PHP
編程語言PHP (語言數: 1)
平台
許可證
所有者活动
創建於2012-06-16 20:52:22
推送於2012-06-16 22:21:21
最后一次提交2012-06-16 15:20:59
發布數0
用户参与
星數9
關注者數2
派生數0
提交數2
已啟用問題?
問題數0
打開的問題數0
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?