PHPackages                             ci-jade/ci-jade - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ci-jade/ci-jade

ActiveLibrary[Templating &amp; Views](/categories/templating)

ci-jade/ci-jade
===============

HAML-like template engine for CodeIgniter

1.1.3(9y ago)3941MITPHPPHP &gt;=5.4.0

Since Apr 19Pushed 9y ago3 watchersCompare

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

READMEChangelog (6)Dependencies (1)Versions (7)Used By (0)

ci-pug
======

[](#ci-pug)

ci-pug is a library for CodeIgniter to enable [Pug Template Engine](http://jade-lang.com/) to render views with *.pug* or *.jade* extension.

- all files in the view folder ending with .pug or .jade can be rendered from the controllers but you can still use any other files as views. So you're free to use Pug for all your views or just some of them.
- use the `'cache' => true` setting to render your views only once and save rendered files the *cache* folder, then serve cached file with no performance loss, views will be loaded as fast as the equivalent php views. You can also use `'cache' => '/your/cutom/path`
- ci-pug wait for you to load it. Only controllers with `use Pug;`will load the wrapper, and until you call `$this->settings()` or `$this->view()` in the controller, the template engine will not be loaded.

Installation
------------

[](#installation)

You need PHP 5.4 or later to run ci-pug. If you use a earlier version of PHP we recommand you to upgrade. If you cannot you can download the [library version](https://github.com/pug-php/ci-pug) of ci-pug (available on PHP 5.3).

Open a terminal in the **application** folder in your CodeIgniter project, then enter:

```
composer require ci-pug/ci-pug
```

Be sure `$config['composer_autoload'] = true;` in your **application/config/config.php** file

How to use it?
--------------

[](#how-to-use-it)

#### application/controllers/Main.php

[](#applicationcontrollersmainphp)

```
