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:

  1. spiffy template languages haml , sass.template languages haml , sass.

the framework looks far complete, wouldn't use essential.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -