Add documentation on creating custom page banners.
Review Request #15077 — Created May 26, 2026 and submitted
Page banners are a new feature in Review Board 8. They give extensions a
consistent way of displaying important information at the top of any or
all pages, using little more than aTemplateHookand some context
variables, but allowing for more advanced interactions and content.This guide covers how to create page banners, walking through basic
TemplateHookusage and working through subclasses for dynamic content,
custom templates for additional layout and scripting, and details like
how to use cookies and JavaScript to implement support for closing
banners.
Built the docs. Checked for build errors, spelling errors, and link
errors.Ran this through Claude to check for additional problems.
| Summary | ID |
|---|---|
| 90f65121eaff9b85e82d08eb902549fbea2d63b1 |
| Description | From | Last Updated |
|---|---|---|
|
Reminder to reference this page in the release notes where we talk about custom page banners. |
|
|
|
Can we say "expired license warnings" instead. |
|
|
|
Points 1 and 3 sound a bit confusing together. How about something like: 1. **Banner templates are created** by using … |
|
|
|
Can we add something like this in a new paragraph below: See Closing Banners <extension-page-banners-closing>_ for more guidance. |
|
|
|
Add a "to" between "listen" and "a" here. |
|
|
|
Can we say "Here's an example that shows a banner only during maintenance hours:". |
|
|
|
Shouldn't this be :ref: instead of using link syntax? |
|
|
|
This still has a _ at the end. |
|
|
|
typo: vairables -> variables |
|
|
|
Needs spaces around the = |
|
|
|
These dates are kinda funky. Mind adding a comment explaining why 1999-3999? |
|
|
|
Needs spaces around the = |
|
|
|
Needs spaces around the = |
|
|
|
Should be getElementById('{{banner_id}}') (no #) |
|
|
|
This needs a max-age or it won't persist past the browser session. |
|
|
|
Hmm, just realized this also doesn't actually close the banner. Should we add bannerEl.remove()? This should probably also be taking … |
|
|
|
This should be extension-page-banners I think. |
|
|
|
This ref is extensions-page-banner-context but all the others are extension-page-banners-* |
|
-
-
-
-
Points 1 and 3 sound a bit confusing together. How about something like:
1. **Banner templates are created** by using or subclassing :ref:`TemplateHook <template-hook>` along with :file:`ui/components/page-banner.html`. 3. **Banners are registered** by instantiating the :ref:`TemplateHook <template-hook>` using the ``page-banners`` hook point in your extension. -
Can we add something like this in a new paragraph below:
See
Closing Banners <extension-page-banners-closing>_for more guidance. -
-
- Change Summary:
-
Improved wording throughout, and fixed typos.
- Commits:
-
Summary ID 46e3bec7fb3ae1b6847257f7d60648ea2677afcb 68c900a71c2bd818679b07d0528fa89b986fe3f8
Checks run (2 succeeded)
- Change Summary:
-
- Fixed some errors in code samples.
- Switched a local anchor ref to a
:ref:. - Fixed a typo.
- Added an upper-bound
max-ageto the sample cookie.
- Commits:
-
Summary ID 68c900a71c2bd818679b07d0528fa89b986fe3f8 f0f24ad5e4d13ad122997cef99f7b49b2f80b710
Checks run (2 succeeded)
- Change Summary:
-
- Updated the close code sample to remove the banner.
- Fixed reference names.
- Removed a stray
_.
- Commits:
-
Summary ID f0f24ad5e4d13ad122997cef99f7b49b2f80b710 d9bb6bc727d563935368799f7b67ef2dddae0ab7