Include Reusable Partials
Pull in navbars and footers with include.
Some Parts Are Shared, Not Page-Wide
A navbar or footer appears on many pages but is not the whole layout. For these chunks you reach for include instead of inheritance. 🧱
extends vs include
Use extends to inherit a full skeleton, but use include to drop a small reusable snippet into the current template at that spot.
All lessons in this course
- Define a Base Template with Blocks
- Extend the Base in Child Pages
- Include Reusable Partials
- Macros for Repeated Markup