feat: #3622833 Add a Newsletter Canvas page and point the footer Subscribe at it
Fixes #3622833.
What this changes
#3622817 gave the footer Subscribe button the destination it was missing, pointing it at /form/newsletter-subscribe. That fixed the dead button, but the destination is the bare Webform route: no heading, no context, just an email field under the site header.
This ships a Newsletter page at /newsletter, composed the way every other page in this template is composed, and points the footer at it.
Two files:
content/canvas_page/11-newsletter.yml— the page.config/canvas.page_region.vartheme_bs5_horizonaid.footer.yml— the Subscribehrefmoves from/form/newsletter-subscribeto/newsletter.
The page
- A
media-bannercarrying a Horizon Aid asset-library image, with abadge("Newsletter"), anh1reading Stay informed, and a lead paragraph in its content slot. - A centred
groupholdingblock.webform_block(webform_id: newsletter_subscribe) and a "No spam. Unsubscribe any time." note. - A 33-33-33 section of three
card-textcards onbg-primary-subtle, each with aniconSDC, a heading and a line of text: Field Updates, Impact Reports, Events.
No HTML in configuration and no theme change. Every component is one the template already ships, so the page inherits the brand and stays editable in Canvas.
How it looks
Two things worth stating
The icons are icon SDC components, not markup. canvas_html_block allows only <strong> <em> <u> <a> <p> <br> <ul> <ol> <li>, so an <i class="bi-..."> written into a text component is stripped silently and the labels run together on the rendered page.
No component versions are pinned. All 215 SDC components across the shipped pages carry none, and a pinned hash fails a fresh install with component_version=... is not a version that exists on ....
A form inside a Canvas page completes its submit cycle, which a form in the footer page region does not: there the response it needs to send is wrapped by Twig into a RuntimeError before Canvas can re-throw it (RenderSafeComponentContainer::handleComponentException() re-throws only EnforcedResponseException and FormAjaxException), so the submission saves but the visitor sees nothing. A Canvas page behaves correctly.
Verification
On a fresh Drupal CMS 2.1.4 install with the Horizon Aid site template picked in the browser installer:
canvas_page 1 | Newsletterimported;/newsletterreturns 200.- Exactly one
h1, reading "Stay informed"; badge and banner image present. - Three
card-textcards, sixbi-icons, one "No spam" note, one email field. - Zero Canvas render errors and nothing logged to the
canvaschannel. - The footer Subscribe button lands on
/newsletter. - The subscribe form submits anonymously and the submission is recorded.
- The email field and the Subscribe button are the same height (56/56 desktop and mobile).
AI-Generated: Yes
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release
