In Drupal, Paragraphs, Layout Builder, and custom templates are all tools for controlling how content is structured and displayed — but they serve different purposes and are used in different contexts. Here's a clear breakdown of each and when to use them:
✅ 1. Paragraphs
❓ What it is:
The Paragraphs module lets site builders define reusable, flexible content components (like “Image + Text”, “Slider”, “Video”, etc.) that editors can mix and match in a structured way within content types.
✅ Use cases:
- Editors need to build rich, structured content (like landing pages or articles).
- You want reusable components (paragraph types).
- You want to enforce structured data entry but with flexible layout.
🔧 Example:
You create a “Hero Banner” paragraph with an image, headline, and CTA button. Editors can add it to a page wherever allowed.
🧩 Pros:
- Easy for content editors.
- Structured and consistent.
- Allows nested content blocks.
- Can be themed per paragraph type.
❌ Cons:
- Can get complex with deep nesting.
- Not visual (no drag-and-drop out of the box).
- Needs custom theming for visual layout.
✅ 2. Layout Builder (Core)
❓ What it is:
Layout Builder is a visual drag-and-drop interface for placing blocks and fields into layouts on content pages. You can override layouts per content type or per individual node.
✅ Use cases:
- Editors want visual control over page layout.
- You want to create custom landing pages without code.
- You need layout flexibility on a per-page basis.
🔧 Example:
For a landing page, the editor uses Layout Builder to add a 2-column layout, place a banner block on top, and a text block next to an image.
🧩 Pros:
- WYSIWYG drag-and-drop.
- Can work with fields, blocks, views, etc.
- Per-node layout override possible.
- In core, stable and supported.
❌ Cons:
- Less structured than Paragraphs (can be more chaotic).
- Can become messy without editorial guidelines.
- Needs good theming setup for styling options.
- Less control over data structure.
✅ 3. Custom Templates (Twig)
❓ What it is:
Twig templates are used to define how content is rendered at the theme layer. This is pure theming, not for content structure.
✅ Use cases:
- You want full control over HTML output.
- You need performance or styling optimizations.
- You want to hard-code layout for specific content types or pages.
🔧 Example:
You override node--article.html.twig to customize how article nodes look, or create a special page--front.html.twig for a unique homepage.
🧩 Pros:
- Full control over markup and layout.
- Fastest in terms of rendering.
- Great for strict design implementation.
❌ Cons:
- No UI — changes require code.
- Not flexible for editors.
- No reusable components across content types.
- Doesn’t structure content — just renders it.
🔍 When to Use What?
| Situation | Best Option |
|---|---|
| Reusable content blocks with structured input | Paragraphs |
| Visual editor wants to build layouts | Layout Builder |
| You need full control over HTML output | Custom Twig Template |
| Building landing pages with flexible layout | Layout Builder or Paragraphs |
| Static homepage with unique design | Custom Template |
| Content needs nesting and structured data | Paragraphs |
✅ Can You Combine Them?
Yes. You can use all three together:
- Paragraphs to create structured content blocks,
- Layout Builder to place those blocks visually,
- Twig templates to control how those blocks are rendered.
Comments