User Tools

Site Tools



The view part of the MVC pattern is managed by Templo

Templo is a template engine based on .mtt files ( “motion twin templates” )

How it works

Simply set variables in the view object from the controller :

class MainController extends sugoi.BaseController
  function doHello(name:String){ = name;

Create a template named “hello.mtt” which will print the variable “name” set from the controller :

  <body> Hello ::name:: ! </body>

Another example : looping on an iterable of users to display an html list :

::foreach u users::
  <li> has id </li>

Please read templo documentation for more details