# Layouts In **Osumi Framework**, a **layout** is a special kind of component that wraps the output of the main action component. Layouts are typically used to share the same HTML structure across multiple routes (for example: `
`, metadata, header/footer, script/style injection, etc.). A layout is applied **after** the route component is executed and rendered, and it receives the rendered output as its `body`. --- ## 1. How Layouts Work (Render Flow) When a route is matched, Osumi Framework executes this sequence: 1. The route is resolved (Routing). 2. Filters are executed (if any). 3. The route component is instantiated and rendered. 4. If a layout is defined for the route, the layout is instantiated and receives: - `title`: default title from config - `body`: the rendered output from the route component 5. The layout template is rendered, producing the final response. This means: - Your **action component** focuses on producing the **page content**. - Your **layout** provides the shared structure and wraps that content. --- ## 2. Default Layout When you create a new Osumi Framework project, a default layout is generated. ### 2.1 Default Layout Component `DefaultLayoutComponent` is a very simple component that only defines the public properties used by its template: - `title`: page title - `body`: HTML content from the action component ### 2.2 Default Layout Template The default layout template contains a standard HTML skeleton and uses two placeholders: - `{{title}}` → inserted in `