Views

Usage

With the awesome helper function view you can display your views extreamly simple:

view("welcome");
//or view("welcome.tpl") both works but the file itself must have .tpl as ending

Shows the view.tpl file inside the pre defined template disk. If you want to use sub directorys you can do that but you need to type them in like this:

view("sub/dir/yourview");

Extra features

You can assing data to Smarty values by simply adding it as an array parameter:

view("yourTemplate", ["valueName" => "someValuedataThatCouldBeAnythingYouWant"]);

You can add as many as you want. You can even assign rendered templates to values:

view("yourTemplate", ["valueName" => "fetch:someTemplate"]);