# Working with Templates Templates control how your content is presented. FolderWeb uses a simple PHP-based template system—no complex templating languages, just HTML with a sprinkle of PHP. ## Template Types FolderWeb has three template levels: ### 1. Base Template (`base.php`) The HTML scaffold wrapping every page: ```
= $item['summary'] ?>
= $readingTime ?> min read
= htmlspecialchars($item['summary']) ?>
Read more →= htmlspecialchars($item['summary']) ?>
= $metadata['summary'] ?>
= htmlspecialchars($metadata['summary']) ?>
``` ### 3. Use Short Echo Tags ```php = htmlspecialchars($title) ?> ``` ### 4. Keep Logic Minimal Templates should display data, not process it. Complex logic belongs in plugins. ```php strtotime('-30 days'); }); usort($posts, function($a, $b) { return strcmp($b['date'], $a['date']); }); ?> ... ``` ### 5. Use Semantic HTML ```php= htmlspecialchars($item['summary']) ?>