Templates that drive
2026-09-14
Most frameworks start in a controller. The controller fetches the data, decides what to show and hands it to a template, which is the last …The first 25 words of each post body - its tags dropped with html, an ellipsis where it goes on.
<?php
$posts = [
[ 'title' => 'Templates that drive', 'date' => '2026-09-14',
'body' => '<p>Most frameworks start in a controller. The controller fetches the data, decides what to show and hands it to a template, which is the last and least important step.</p><p>PAD turns that around: the template is where a request starts. It asks for the data it needs, the way a reader asks for a page, and the PHP beside it answers.</p>' ],
[ 'title' => 'Charts without JavaScript', 'date' => '2026-10-01',
'body' => '<p>A chart is a picture, and a picture can be drawn on the server. The chart tag writes inline SVG: bars, lines, pies and forty other kinds, with a title and a description for a screen reader & colours that follow the page into dark mode.</p>' ] ];
?>
<div>
{posts}
<article>
<h3>{$title}</h3>
<p><small>{$date}</small> {excerpt $body, words=25, html}</p>
</article>
{/posts}
</div>
2026-09-14
Most frameworks start in a controller. The controller fetches the data, decides what to show and hands it to a template, which is the last …2026-10-01 A chart is a picture, and a picture can be drawn on the server. The chart tag writes inline SVG: bars, lines, pies and forty …