0PricingLogin
Flask Academy · Lesson

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

  1. Define a Base Template with Blocks
  2. Extend the Base in Child Pages
  3. Include Reusable Partials
  4. Macros for Repeated Markup
← Back to Flask Academy