You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cms/themes.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,22 +355,22 @@ This approach allows you to:
355
355
- Update the parent theme and have changes cascade to all child themes automatically
356
356
- Store tenant-specific customizations in the database while sharing a common codebase
357
357
358
-
**Example: Creating a virtual child theme**
358
+
**Example:** Creating a virtual child theme
359
359
360
360
1. Enable database templates in `config/cms.php`:
361
361
362
362
```php
363
363
'databaseTemplates' => true,
364
364
```
365
365
366
-
2. Create a theme record in the database with just the `theme.yaml` content:
366
+
1. Create a theme record in the database with just the `theme.yaml` content:
367
367
368
368
```yaml
369
369
name: "Client A Custom Theme"
370
370
parent: base-theme
371
371
```
372
372
373
-
3. Customize only the templates that need to differ from the parent by saving them to the database
373
+
1. Customize only the templates that need to differ from the parent by saving them to the database
374
374
375
375
The child theme will now function without any physical directory, inheriting everything from `themes/base-theme` except for the database-stored customizations.
0 commit comments