Partials Directory Structure
-
Rule: Reusable template parts MUST be organized in the
partials/directory with the following structure:
templates/
├── partials/
│ ├── components/ # Reusable on multiple pages
│ │ ├── contact-box.latte
│ │ ├── product-card.latte
│ │ └── newsletter-form/
│ │ ├── core.latte
│ │ ├── form.latte
│ │ └── success.latte
│ │
│ └── modules/ # Used on ALL pages (global)
│ ├── header.latte
│ ├── footer.latte
│ ├── navigation/
│ │ ├── core.latte
│ │ ├── mobile-menu.latte
│ │ └── dropdown.latte
│ └── cookie-consent.latte
Components vs Modules
| Type | Location | Usage | Examples |
|---|---|---|---|
| Components | partials/components/ |
Reusable across multiple pages | contact-box, product-card, testimonial, pricing-table |
| Modules | partials/modules/ |
Present on all/most pages | header, footer, navigation, cookie-consent, sidebar |
File Naming
-
Rule: Template files and folders MUST use kebab-case naming.
Example (Correct):
contact-box.latte
product-card.latte
newsletter-form/
user-profile/
Example (Incorrect):
contactBox.latte # camelCase
ProductCard.latte # PascalCase
contact_box.latte # snake_case
Summary:
partials/components/for reusable parts used on multiple pages.partials/modules/for global parts used on all pages.- File and folder names MUST use kebab-case.