Testimonial
A semantic quote card with optional attribution, avatar and logo.
Try it
Attributed quote
Quote with named author and accessible avatar.
Use it
Working invocation
This code creates the configuration shown above. Copy the template and the required Python context together.
{% include "brickwork_marketing/components/_testimonial.html" %}
context = {'quote': 'The component contracts made our migration predictable.', 'author': 'Jordan Lee', 'role': 'Engineering manager, Acme', 'avatar': '/static/people/jordan-lee.jpg'}
Guide
Add it to your project
- Use the public include path "brickwork_marketing/components/_testimonial.html" from the installed django-brickwork package.
- Include with quote, then optional attribution values.
- Give avatar only when author is present so its implied alt is useful.
- Pass safe logo HTML or extend the public logo block.
- When filling logo block, also provide author, role, avatar or logo context so the figcaption gate exists.
Options
Public API
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
| quote | string | Not set | Yes | The testimonial quotation; without it the component emits no figure. Constraint: No additional template constraint beyond the documented type. |
| author | string | Not set | No | Attribution name for the testimonial. Constraint: No additional template constraint beyond the documented type. |
| role | string | Not set | No | Short attribution or position line below the name. Constraint: No additional template constraint beyond the documented type. |
| avatar | image URL | Not set | No | Image URL for the testimonial avatar; its alt text is the author. Constraint: Only supply a usable URL with a non-empty author, because the author becomes its alt text. |
| logo | safe HTML | Not set | No | Pre-rendered safe company-logo HTML in the testimonial attribution. Constraint: Caller owns escaping; it only renders when the testimonial also has attribution content. |
Named blocks
Fill these only when you extend the component template. They are not values passed to an include or tag.
| Block | What it replaces |
|---|---|
| logo | Replaces the testimonial logo region. |
Behaviour
Accessibility and responsive behaviour
- Accessibility
- Uses figure, blockquote and figcaption. Avatar alt is inferred from author; safe logo markup remains caller responsibility.
- Responsive
- No intrinsic breakpoint; a parent quote grid controls layout.
- Without JavaScript
- Static HTML; no JavaScript required.
Need help?
Troubleshooting
An overridden logo block is blank.
The attribution wrapper only exists when author, role, avatar, or logo is truthy. Provide normal attribution content; do not use a placeholder logo sentinel.
Explore next