A view is a Template Toolkit file (view.tt) that wraps rendered page
content. It controls the HTML structure, styling, and layout of every
page on the site.
public_html/lazysite/templates/view.tt
When rendering a page, lazysite looks for a view template in this order:
layout: front matter value (checked as theme, then
named template)theme: from lazysite.conf (checked as theme, then
named template)lazysite/templates/view.ttThe built-in fallback ensures pages always render, even without any configuration.
All variables from lazysite.conf, plus:
content - the rendered page body HTMLpage_title - from front matter title:page_subtitle - from front matter subtitle:page_modified - formatted mtime ("1 January 2024")page_modified_iso - ISO mtime ("2024-01-01")nav - navigation array from nav.conftheme_assets - asset path for remote themes (when applicable)<!DOCTYPE html>
<html lang="en">
<head>
<title>[% page_meta_title %] - [% site_name %]</title>
</head>
<body>
<h1>[% page_title %]</h1>
[% content %]
</body>
</html>
.html cache files after changing the view template to
see the new layout on all pagesINCLUDE,
PROCESS, conditionals, and loops