frameworks - frank.php templates -
happy see sinatra-like microframework in php http://github.com/brucespang/frank.php
but, documentation scarce, , i'm not understading reading code (maybe i'm not able):
you can define views directory
set(array('views' => dirname(__file__) . '/templates'));
but how can render file inside it?
how passing parameters?
there no templating, simple php?
bye
if take @ index.php file (i added comments myself):
// when go */template get("/template", function(){ // calls template named "template" , passes variables render('template', array('locals' => array('name' => 'template'))); }); // setup "template" named template template("template", function($locals){ echo 'hello '.$locals['name']; });
it says directly in readme doesn't support templating languages yet:
what frank.php missing:
- spiffy template languages haml , sass.template languages haml , sass.
the framework looks far complete, wouldn't use essential.
Comments
Post a Comment