Government Banner defines variable for image path, then does not use it

Created on 23 April 2025, 2 days ago

Problem/Motivation

The government banner theme implementation defines image_base as the path for images within the template, but the template uses uswds_images instead.

Steps to reproduce

The definition is in uswds_base_theme: https://git.drupalcode.org/project/uswds_base/-/blob/3.10.x/uswds_base.theme?ref_type=heads#L21

The render array is provided to the page.html.twig template in uswds_base_preprocess_page: https://git.drupalcode.org/project/uswds_base/-/blob/3.10.x/preprocess/layout/page.preprocess.inc?ref_type=heads#L60

The template uses uswds_images from uswds_base_preprocess instead of image_base: https://git.drupalcode.org/project/uswds_base/-/blob/3.10.x/templates/uswds/government-banner.html.twig?ref_type=heads#L16

Proposed resolution

There are 2 options:

  • Use image_base in the templates
  • Remove image_base variable that is not used

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

3.10

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tregonia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024