Skip to content

Examples ​

Complete templates for common jobs, each from a working Craft site. Copy them, then change the markup to suit your own.

ExampleWhat it shows
Cart count in a cached headerA personal part on every cached page
Newsletter form in a cached footerA Formie form that doesn’t stop pages being cached
Contact form on a cached pageA plain Craft form, with its CSRF token refreshed
Live data, refreshed every minuteData from outside Craft, with ttl()
Cache status bar for developmentSee at a glance whether a page came from the cache