Yii extension for Jade template system
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
vendors
.gitmodules
CJadeViewRenderer.php
README.md

README.md

Yii-jade

Yii's extension for Jade template system

Instructions

  • Code must be in this folder 'protected/extensions/yii-jade/'

  • Since I'm using git submodules, you need to init them:

    cd protected/extensions/yii-jade
    git submodule init
    git submodule update
  • Add this to your 'config/main.php' file:

    'components'=>array(
        ...
        'viewRenderer'=>array(
            'class' => 'ext.yii-jade.CJadeViewRenderer',
        ),
        ...
  • You may want to add the following line, so the compiled templates will have passed data to a template in the main var list

             'prepend' => array('<?php extract((array)$data); ?>'),
  • Jade templates must have '.jade' extension