Cta split
A mid-page CTA with copy and actions in separate columns.
Try it
Mid-page action
A two-action section.
Use it
Working invocation
This code creates the configuration shown above. Copy the template and the required Python context together.
{% include "brickwork_marketing/components/_cta_split.html" %}
context = {'heading': 'See the complete API.', 'body': 'Every public option is documented from its shipped contract.', 'primary_cta_label': 'Read documentation', 'primary_cta_href': '/docs/', 'secondary_cta_label': 'View source', 'secondary_cta_href': '/source/'}
Guide
Add it to your project
- Use the public include path "brickwork_marketing/components/_cta_split.html" from the installed django-brickwork package.
- Include with heading and optional body.
- Pass CTA objects or flat fields; objects win.
- Place it in the normal marketing content rail.
Options
Public API
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
| heading | string | Not set | Yes | Reason to render the band. Constraint: No additional template constraint beyond the documented type. |
| body | string | Not set | No | Supporting plain-text paragraph. Constraint: No additional template constraint beyond the documented type. |
| primary_cta | object {label, url} | Not set | No | Takes precedence over flat fields. Constraint: Use either this object or its flat pair. If both are supplied, this object wins. |
| primary_cta_label | string | Not set | No | Visible label for the template-authorable primary CTA. Constraint: Supply `primary_cta_href` too; ignored when `primary_cta` is present. |
| primary_cta_href | string | Not set | No | Destination for the flat primary CTA; pair it with `primary_cta_label`. Constraint: Supply `primary_cta_label` too; ignored when `primary_cta` is present. |
| secondary_cta | object {label, url} | Not set | No | Secondary CTA object with exactly `label` and `url`; it overrides the flat secondary fields. Constraint: Use either this object or its flat pair. If both are supplied, this object wins. |
| secondary_cta_label | string | Not set | No | Visible label for the template-authorable secondary CTA. Constraint: Supply `secondary_cta_href` too; ignored when `secondary_cta` is present. |
| secondary_cta_href | string | Not set | No | Destination for the flat secondary CTA; pair it with `secondary_cta_label`. Constraint: Supply `secondary_cta_label` too; ignored when `secondary_cta` is present. |
Behaviour
Accessibility and responsive behaviour
- Accessibility
- Copy comes before actions in reading and tab order; heading is h2.
- Responsive
- Stacks below md and becomes a row at md.
- Without JavaScript
- Static HTML; no JavaScript required.
Need help?
Troubleshooting
The CTA stacks unexpectedly on desktop.
Check the viewport: this component becomes a row only from the package md breakpoint; do not add site CSS to force a smaller breakpoint.
Explore next