Most of what a template does on Core dna happens before the engine is involved: the route picks a controller, the controller loads a record, the record's layout names a template, and the template is looked up in three folders. Read this unit first, whatever your site's engine; the Smarty and Twig units that follow assume it and stay short because of it.

Start with Two engines, one platform for what the engine setting changes and what it does not. Template resolution order and Which template renders a record answer the two questions behind most “why is this rendering?” tickets: which file, and why that one. Global template variables and Response models are the reference for what a template has to work with and what it may call. Rendering a template from a string is for template code kept in the admin rather than the repository, and Compilation and caching for when a change does and does not show. The unit ends with Choosing an engine for a new site, which tells you which of the next two units to read.