Make behavior of alerts on translated pages configurable

Created on 22 September 2023, about 1 year ago

Problem/Motivation

The issue ✨ Respect selected language for alert Fixed proposed that alerts only show on pages that match the alert language, but there are also use cases where it is desirable for translated pages to display an untranslated alert.

For example, a page for a public park needs an alert because of a wildfire, zombie apocalypse or other life-threatening emergency. The alert needs to go on the site, but there isn't time to have the content translated. It should be possible to display the alert in the original language on translated pages.

Proposed resolution

Add a configuration option to fall back on the original language, set to false by default. This way, the current behavior is retained when the module is updated.

In SitewideAlertManager::activeSitewideAlerts, check the configuration before filtering the collection on the current language.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States calebtr

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

Comments & Activities

Production build 0.71.5 2024