Divergence uses the Twig Template Engine as it's primary template engine. It is recommended that you reference Dwoo documentation for details on how to use Dwoo templates. This documentation will discuss helpers for your controllers that will allow you to serve templates at a moment's notice.
A typical Divergence project will have a views
folder containing all the Twig templates.
To generate a Response use a Twig template like so.
return new Response(new TwigBuilder('blog/posts.twig', [
'BlogPosts' => $BlogPosts,
'isLoggedIn' => App::$App->is_loggedin(),
'Sidebar' => $this->getSidebarData(),
'Limit' => static::LIMIT,
'Total' => DB::foundRows(),
]));
new Response(new TwigBuilder('helloworld.twig', [
'text'=>'Hello World'
]));
{{ text | raw }}
Will print the classic
Hello World