CandidTemplate

A DOM-based templating engine focused on structure, composition, and clean binding.
---

🚀 Quick Example


$tpl = (new CandidTemplateAdaptor('views'))
    ->bind('layout.html');

$page = $tpl->slot('content','home');
$page->pick('title')->content('Welcome');

echo $tpl->build()->render();
---

🧠 1. Template Composition Flow

layout.html
    ↓
slot('content','admin')
    ↓
slot('content','dashboard')
    ↓
Final Render
Build UI layer by layer using nested layouts.
---

🧩 2. Rendering Pipeline

HTML Template
     ↓
DOM Parsing (CandidDomContext)
     ↓
Slots + Includes
     ↓
Loops
     ↓
Data Binding (pick)
     ↓
Final HTML
Everything is processed through a structured DOM pipeline.
---

🔁 3. Data Flow

Controller / Data File
        ↓
Template (set / get / share)
        ↓
pick() binding
        ↓
Rendered UI
Clear separation between data and structure.
---

⚡ Key Features

---

🎯 Philosophy

Structure → Composition → Binding → Rendering
---

📦 When to Use

---

🚫 When NOT to Use

---
CandidTemplate is designed for structured rendering, not client-side reactivity.