• 
      

    Add documentation on creating custom page banners.

    Review Request #15077 — Created May 26, 2026 and submitted

    Information

    Review Board
    release-8.x

    Reviewers

    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 a TemplateHook and some context
    variables, but allowing for more advanced interactions and content.

    This guide covers how to create page banners, walking through basic
    TemplateHook usage 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
    Add documentation on creating custom page banners.
    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 a `TemplateHook` and some context variables, but allowing for more advanced interactions and content. This guide covers how to create page banners, walking through basic `TemplateHook` usage 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.
    90f65121eaff9b85e82d08eb902549fbea2d63b1
    Description From Last Updated

    Reminder to reference this page in the release notes where we talk about custom page banners.

    maubin maubin

    Can we say "expired license warnings" instead.

    maubin maubin

    Points 1 and 3 sound a bit confusing together. How about something like: 1. **Banner templates are created** by using …

    maubin maubin

    Can we add something like this in a new paragraph below: See Closing Banners <extension-page-banners-closing>_ for more guidance.

    maubin maubin

    Add a "to" between "listen" and "a" here.

    maubin maubin

    Can we say "Here's an example that shows a banner only during maintenance hours:".

    maubin maubin

    Shouldn't this be :ref: instead of using link syntax?

    david david

    This still has a _ at the end.

    david david

    typo: vairables -> variables

    david david

    Needs spaces around the =

    david david

    These dates are kinda funky. Mind adding a comment explaining why 1999-3999?

    david david

    Needs spaces around the =

    david david

    Needs spaces around the =

    david david

    Should be getElementById('{{banner_id}}') (no #)

    david david

    This needs a max-age or it won't persist past the browser session.

    david david

    Hmm, just realized this also doesn't actually close the banner. Should we add bannerEl.remove()? This should probably also be taking …

    david david

    This should be extension-page-banners I think.

    david david

    This ref is extensions-page-banner-context but all the others are extension-page-banners-*

    david david
    maubin
    1. 
        
    2. Show all issues

      Reminder to reference this page in the release notes where we talk about custom page banners.

    3. Show all issues

      Can we say "expired license warnings" instead.

    4. docs/manual/extending/extensions/page-banners.rst (Diff revision 1)
       
       
       
       
       
       
       
       
       
      Show all issues

      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.
      
    5. docs/manual/extending/extensions/page-banners.rst (Diff revision 1)
       
       
       
       
       
      Show all issues

      Can we add something like this in a new paragraph below:

      See Closing Banners <extension-page-banners-closing>_ for more guidance.

    6. Show all issues

      Add a "to" between "listen" and "a" here.

    7. Show all issues

      Can we say "Here's an example that shows a banner only during maintenance hours:".

    8. 
        
    chipx86
    david
    1. 
        
    2. Show all issues

      Shouldn't this be :ref: instead of using link syntax?

      1. It's on the same page, so it can be either. :ref: gets to anchors on a different page. ..._ gets to anchors on the current page.

    3. Show all issues

      typo: vairables -> variables

    4. Show all issues

      Needs spaces around the =

    5. docs/manual/extending/extensions/page-banners.rst (Diff revision 2)
       
       
       
       
       
      Show all issues

      These dates are kinda funky. Mind adding a comment explaining why 1999-3999?

      1. That takes all the fun out of that code sample.

    6. Show all issues

      Needs spaces around the =

    7. Show all issues

      Needs spaces around the =

    8. Show all issues

      Should be getElementById('{{banner_id}}') (no #)

      1. Bah, I fixed this in one of the code samples and forgot to carry it over to this one.

    9. Show all issues

      This needs a max-age or it won't persist past the browser session.

    10. 
        
    chipx86
    maubin
    1. Ship It!
    2. 
        
    david
    1. 
        
    2. Show all issues

      This still has a _ at the end.

    3. docs/manual/extending/extensions/page-banners.rst (Diff revisions 2 - 3)
       
       
       
       
       
       
      Show all issues

      Hmm, just realized this also doesn't actually close the banner. Should we add bannerEl.remove()?

      This should probably also be taking in the event and calling preventDefault() so we don't add # to the end of the URL.

    4. Show all issues

      This should be extension-page-banners I think.

    5. Show all issues

      This ref is extensions-page-banner-context but all the others are extension-page-banners-*

    6. 
        
    chipx86
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-8.x (74d347b)