Part 2: The builder: settings, templates and overrides
This is the second part of Extension development: the book. A builder changes how a site behaves and looks without writing PHP. Most real projects are built almost entirely with the tools of this part, and every extension developer and theme developer uses them daily, so this part is worth reading even if you came for PHP.
You will work in an extension of your own from the first chapter on: a settings extension for your site's
configuration and a design extension for its templates. That keeps every change in one folder under version
control, instead of scattered across settings/override/ and the kernel's directories.
Chapters
Settings
| Chapter | What you learn |
|---|---|
| How INI settings work | Files, blocks, variables, arrays, hashes, comments, the INI cache |
| Settings scopes and the order they win in | Default, extension, siteaccess, override, and the per-site directories inside extensions |
| Siteaccess settings | What a siteaccess is, how a request picks one, what goes in its settings |
| Settings that live in an extension | Moving a site's configuration into an extension |
| Changing settings with exp:ini | Every verb of the settings command, with dry runs and backups |
| Settings in the administration | Setup > Ini settings: the override chain, comparison, safe saving |
| .ini.append.php files and keeping settings safe | Why the PHP wrapper, secrets, permissions, what never to commit |
Templates
| Chapter | What you learn |
|---|---|
| Templates for builders | The template language: variables, conditions, loops, includes |
| The design chain: where a template is found | Site design, additional designs, design extensions, standard |
| Template overrides: the basics | Replacing one template for some content only |
| Override conditions | Every match key: class, node, parent, section, state, view mode, depth and more |
| View modes for builders | full, line, embed and your own |
| Fetching content in templates | fetch(): lists, trees, counts, filters, sorting |
| The template operators builders use most | A working set of operators with examples |
| Debugging templates | Finding why a template or an override does not apply |
| Caching and templates | The view cache, cache-block, and when to clear what |
The rest of the builder's toolbox
| Chapter | What you learn |
|---|---|
| Content classes for builders | Designing the content model |
| Sections, roles and access for builders | Who may see and do what |
| Workflows for builders | Approval and other events on publish |
| Cronjobs for builders | What runs on a schedule, and how to set it up |
| Building a site without writing code | A complete small site from settings, classes and templates |
| When settings are not enough | Deciding when to write PHP, and which extension point to use |
Before you start
You need a development installation (Setting up a development installation) with debug output on, and you should have done Your first hour as a developer.
Related pages
- Previous: Asking the community for help
- Next: How INI settings work
- Extension development: the book
- Templates and design
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.