Appearance
Template Engine
How Kooboo organizes and renders pages, layouts, views, and routed static assets.
Overview
In Kooboo:
- Page defines an addressable HTML page.
- Layout provides the shared page skeleton such as
<head>, navigation, and placeholder regions. - View is a reusable HTML fragment.
- Script and Style are independent
.jsand.cssassets with their own site routes.
Server-side data binding is handled through env="server" and directives such as k-content and k-for. Declarative data queries are handled by k-data.
Resource Relationship
| Resource | Responsibility | Has its own URL route? |
|---|---|---|
| Layout | Shared HTML skeleton and k-placeholder regions | No |
| Page | URL page, selected layout, injected content | Yes |
| View | Reusable blocks such as headers, cards, and lists | No |
| Script | Importable JavaScript and frontend interaction | Yes |
| Style | Global or page-level stylesheets | Yes |
Docs In This Section
| Topic | Description |
|---|---|
| Layout | Shared shell and placeholder regions |
| Page | Standalone page vs layout-based page |
| View | Reusable fragments inserted by <view id="..."> |
| Script | Site JS resources and type="module" usage |
| Style | Site CSS resources and how they pair with Tailwind |
| Template Binding Syntax | env="server", k-content, k-for, and related directives |
| k-data | <k-data>, <query>, and JSON5 conditions |
Responsibility Boundaries
| Scenario | Doc |
|---|---|
| Write layout, placeholders, and view references in an HTML template | This templateEngine/* section |
Create, update, or delete site resources with KScript such as k.site.pages | k.site |
Render navigation menus with <menu> or k.site.menus + k-for | k.site.menus and CMS: Menus |
| Call external OpenAPI services | k.openApi and CMS: Open API |
| Fetch multilingual dictionaries from an SPA frontend | SPA Multilingual API and CMS |
| Build installable modules with routes and view/api resources | k.module and CMS: Modules |
| Schedule recurring jobs | k.site.runJob and CMS: Scheduled Jobs |
| Change the current request title or metadata | k.page |
Data Querying
- k-data - declarative data flow with
let,query,map, andexport - Historical
k-queryis deprecated; old URLs redirect to k-data