Skip to content

Allow up to 3 CTAs per card#1701

Draft
mwvolo wants to merge 1 commit into
mainfrom
feature-card-multi-cta
Draft

Allow up to 3 CTAs per card#1701
mwvolo wants to merge 1 commit into
mainfrom
feature-card-multi-cta

Conversation

@mwvolo

@mwvolo mwvolo commented Jun 19, 2026

Copy link
Copy Markdown
Member

What

Bumps the cards block cta_block max_num from 1 → 3 so a card can hold multiple CTAs. Migration 0176.

Why a separate PR

Split out of the Batch A work per Tom's review, which questioned whether multiple buttons per card is a good idea. Isolated here so that decision can be made on its own.

Companion

Pairs with flex-pages #12 (the renderer change that actually renders all CTAs). Without that, this only changes what editors can enter. The renderer currently has no default style for a 3rd button, so the help text notes that additional buttons should set a style explicitly.

⚠️ Migration

Adds 0176_alter_rootpage_body off 0175. If other body-altering PRs land first, rebase + regenerate.

🤖 Generated with Claude Code

Bump the cards cta_block max_num from 1 to 3 so a card can hold multiple
CTAs. Help text notes that buttons beyond the second need an explicit style.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 19, 2026 01:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Root/Flex “Cards Block” schema to allow multiple CTAs per card by increasing the allowed number of CTA items, and includes the corresponding StreamField migration so editors can enter up to three CTAs.

Changes:

  • Increase the cards block cta_block ListBlock limit from 1 to 3.
  • Update CTA button style help text to guide editors when adding a 3rd+ CTA.
  • Add migration 0176 to persist the StreamField definition change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
pages/models/constants.py Raises cards-per-card CTA ListBlock max_num from 1 → 3.
pages/custom_blocks.py Updates CTA style help text to account for additional CTAs.
pages/migrations/0176_alter_rootpage_body.py StreamField migration reflecting the updated CTA ListBlock configuration/help text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pages/models/constants.py
Comment on lines 40 to 44
('cta_block', blocks.ListBlock(CTALinkBlock(required=False, label="Link"),
default=[],
max_num=1,
max_num=3,
label='Call To Action'
)),
Comment thread pages/custom_blocks.py
('blue_outline', 'Blue Outline'),
('deep_green_outline', 'Deep Green Outline'),
], help_text='Specifies the button style. Default unspecified, meaning the first button in the block is orange and the second is white.')),
], help_text='Specifies the button style. Default unspecified: the first button in the block is orange and the second is white; set a style explicitly for any additional buttons.')),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants