Skip to content

Conversation

@gregjkal
Copy link
Collaborator

@gregjkal gregjkal commented Feb 9, 2026

  • Adds wagtail page to store testimonials
  • Adds detail page for testimonials (needs configuration in wagtail)
Screenshot 2026-02-10 at 12 35 33 PM
  • Adds section to homepage with testimonial pull-quote. Currently only shows the first one.
Screenshot 2026-02-10 at 2 13 35 PM

@gregjkal gregjkal requested a review from rbbeeston February 9, 2026 16:44
@gregjkal gregjkal changed the title Add hard-coded testimonial section to homepage Add testimonials page and section to homepage Feb 10, 2026
@gregjkal gregjkal changed the title Add testimonials page and section to homepage Add testimonials Feb 10, 2026
@gregjkal gregjkal merged commit f31e05e into develop Feb 10, 2026
0 of 2 checks passed
@gregjkal gregjkal deleted the gk/testimonial branch February 10, 2026 20:19
def get_context(self, request, *args, **kwargs):
context = super().get_context(request, *args, **kwargs)
# Get all live testimonials that are children of this page
context["testimonials"] = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but a more intuitive/wagtail way would be to use the tree with self.get_childre().live().type(Testimonial).order_by("-first_published_at").

return context


class Testimonial(Page):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be named TestimonialPage by convention.

author_url = models.URLField(
help_text="Optional URL to link the author's name to", blank=True, default=""
)
pull_quote = StreamField(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is done as a streamfield, rather than a markdownfield? It seems this field will only ever contain a single block.

),
("md", MarkdownBlock(label="Markdown")),
],
use_json_field=True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This argument is no longer required in current versions of wagtail. Unless you want to set it to false.

[
(
"rich",
RichTextBlock(features=settings.RICH_TEXT_FEATURES, label="Rich text"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to use the same custom settings on all richtext blocks, we could instead set the wagtail setting for it: https://docs.wagtail.org/en/stable/reference/settings.html#wagtailadmin-rich-text-editors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants