i
Frontend DDH ()


Frontend

What a visitor actually sees is produced entirely by server-rendered Template::Toolkit templates -- there is no separate client-side application framework. This section covers Template Toolkit's role in Kastalia specifically; the companion Templates section of this guide catalogues the individual .tt files and what each one is for.

Template Toolkit

Kastalia configures Template::Toolkit with custom delimiters -- <% and %> instead of TT's usual [% and %] -- and with ANYCASE enabled, so template directives are not case-sensitive. Templates live as .tt files under views/, and are free to call back into the shared Perl namespace described in the Backend section to fetch whatever graph data they need (a knot's children, its echoes, its illustrations, and so on) before rendering.

Most pages share common fragments via an INCLUDE directive pointing at "layouts/..." -- the flash-message banner used across the site, for instance, lives in a single shared layout rather than being duplicated into every page template that needs it.