Hello ) I wrote this simple and powerfull template engine for PHP! Popcorn! Site: http://popcorn.template-cms.org/ Built-in popcorn template codes {echo $var} - Output variable {var name $var2} - Assign local template variable {const name $value} - Assign constant {file 'filename'} - Load file {run function()} - Run php function {if expr} {else} {elseif expr} {/if}- If construct {loop $mas as $item}{/loop} {loop $mas as $key => $item}{/loop} - Loop construct {codes} - Show all declared template codes {vars} - Show all declared variables {dump $var} - Dumps information about a variable {assign var 'value'} or {assign var $value} - Assign global variable {include 'template_name'} - Include other template Simple php application <?php // Include Popcorn include 'popcorn/popcorn.class.php'; // Initialize a Popcorn object $popcorn = new Popcorn(); // Variable assign $variable = 'Hello World!'; $popcorn->assign('variable',$variable); $popcorn->assign('show',true); // Draw the template $popcorn->draw('page'); ?> Code (markup): Simple template <html> <head> <title>Simple template</title> </head> <body> {if $show} {echo $variable} {/if} </body> </html> Code (markup): p.s. TCodes - closed!
+ Simple syntax like PHP and smarty + Fast and lightweight! + Generate high quality code not kasha like with smarty + KISS principle
Snippets for Sublime Text @@ - {@ $var} @echo - {echo $var} @if - {if $var} {/if} @ifelse - {if $var} {else} {/if} @ifelseif - {if $var} {elseif $var} {/if} @loop - {loop $key as $item} {/loop} @var - {var name $var2} @const - {const name $value} @assign - {assign var $value} @include - {include 'template_name'} @file - {file 'filename'} @run - {run function()} @vars - {vars} @codes - {codes} @dump - {dump $var} Download: popcorn.zip Install: Unpack the archive to a folder Sublime Text\Packages\User