Skip to content

ketema/li3_jade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

A lithium jade template compiler and renderer

Usage:

Add to your li3 project in the

libraries/jade/
folder and adjust the bootstrap/libraries.php file

 //Jade
 Libraries::add('jade');
 Libraries::add('li3_jade');

A jade library configured to work with li3_jade can be found here

Create a template

 :php
   | echo "This is inline php."

 h2 The Jade template engine Rocks
 p(style='white-space:pre;')
   | Jade makes writing HTML EASY and Beautiful
   | If you don't know about it
   a(href="http://jade-lang.com/") Get on it!

renders

	This is inline php.
	<h2>The Jade template engine</h2>
  	<p style="white-space:pre;">
    	Jade makes writing HTML EASY and Beautiful
    	If you don't know about it
    	<a href="http://jade-lang.com/">Get on it!</a>
  	</p>

Render the template from a controller

 <?php
  	namespace app\controllers;
  	
  	Class JadeController extends \lithium\action\Controller
  	{
  		public function index()
  		{
  			$this->render(array(
  				'template' => 'myjadetemplate',
  				'type' => 'jade',
  			));
  		}
  	}
 ?>

About

Lithium Jade rendering plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages