Skip to content

kevburnsjr/recess-plugin_json-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Template for Recess

This is a Plugin for the Recess PHP Framework which adds a view helper for JSON Template rendering.

Requires

  • Recess >= 0.2

Installation Process

  1. Download this repository to plugins/Jsont
  2. Modify your Application
    • Library::import(‘Jsont.JsontPlugin’);
    • $this→plugins = array( new JsontPlugin() );
  3. That’s it!

Example Usage

post/list.html.jsont

{.section posts}
<ul class="posts">  
{.repeated section @}
  <li>{title} by {author}</li>
{.end}
</ul>
{.end}
$posts = $post->all();
echo Jsont::draw('post/list', $posts);

More info on JSON Template

http://json-template.googlecode.com/svn/trunk/doc/Introducing-JSON-Template.html

About

Adds a view helper for rendering JSON Templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages