twig-view-renderer Allows you to use Twig templates in Yii

Note: Latest release and documentation are available from extension github page.

This extension allows you to use Twig templates in Yii.

Resources

Documentation

Twig view renderer

  1. Documentation
  2. Change Log
  3. 0.9.4
  4. 0.9.3
  5. 0.9.2
  6. 0.9.1
  7. 0.9

This extension allows you to use Twig templates in Yii.

Resources
Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/extensions.
  • Download and extract all Twig files from fabpot-Twig-______.zip\fabpot-Twig-______\lib\Twig\ under protected/vendors/Twig.
  • Add the following to your config file 'components' section:
'viewRenderer'=>array(
     'class'=>'ext.yiiext.renderers.twig.ETwigViewRenderer',
     'fileExtension' => '.html',
     'options' => array(
     	'autoescape' => true,
     ),
     'extentions' => array(
		'My_Twig_Extension',
	 ),
  ),
Usage
  • See Twig syntax.
  • Current controller properties are accessible via {{this.pageTitle}}.

Change Log

0.9.4

  • Added an ability to set Twig environment options (Sam Dark)
  • Added an ability to load extensions (Roman, Sam Dark)

0.9.3

  • Fixed renderFile method (AlexandrZ, Sam Dark)
  • Extension is now theme-aware (zadoev, Sam Dark)

0.9.2

  • Changed translation category to 'yiiext'.
  • New naming conventions.

0.9.1

0.9

  • Initial public release (Sam Dark)
11 0
18 followers
855 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: samdark
Created on: Oct 10, 2009
Last updated: 7 years ago

Related Extensions