Appearance
Page Components
Introduction
For every page, kitloom picks which component of the active theme renders it. The choice is made on the server, in the page stack (the themes module adds a step at Stage::LAYOUT), so it is the same for a Vue theme, a Blade theme and the JSON representation.
A candidate is used only if it exists in the theme — a .vue file in resources/js/Pages for a Vue theme, a template for a Blade theme. Otherwise the next candidate is tried.
Selection rules
Posts
| Order | Component | Example: a book with style wide |
|---|---|---|
| 1 | Pages/{Type}/{Style} | Pages/Book/wide |
| 2 | Pages/{Type}/Index | Pages/Book/Index |
| 3 | Pages/Page/Index | Pages/Page/Index |
{Type} is the post type in StudlyCase — book → Book, case_study → CaseStudy. {Style} is the value of the {type}_style meta of the post (book_style), which lets editors choose a layout per post.
Terms
| Order | Component | Example: a genre term |
|---|---|---|
| 1 | Category/{Taxonomy}/Index | Category/Genre/Index |
| 2 | Category/Index | Category/Index |
Authors, search and 404
| Page | Component |
|---|---|
| Author archive | Pages/Author/Index |
| Search results | Search/Index |
| Not found | Pages/404/Index |
Only types that have URLs get pages: WordPress pages, plus post types and taxonomies with a permalink prefix. Anything else — post_tag on a site without tag archives, a taxonomy kept only for relations — gets Pages/404/Index. A theme without Search/Index shows the 404 component for search too.
Blade template names
The Blade engine maps a component name to a template name by kebab-casing each segment:
| Component | Template |
|---|---|
Pages/Post/Index | pages.post.index → resources/views/pages/post/index.blade.php |
Pages/CaseStudy/Index | pages.case-study.index |
Category/Genre/Index | category.genre.index |
Pages/404/Index | pages.404.index |
What the theme knows about the page
The step puts view into the page data — the component and what it renders, enough for a client-side resolver to make the same choice during Inertia navigation:
json
"view": {
"component": "Pages/Book/Wide",
"modelType": "post",
"postType": "book",
"taxonomy": null,
"layout": "wide"
}modelType is post, term, user or search. A term has taxonomy and no postType. Without a theme there is no view at all: nobody picks a component.
Turning it off
A site that picks components itself can disable the step and add its own at Stage::LAYOUT:
php
// config/kitloom-themes.php
return [
'pipeline' => ['register' => false],
];