Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a hook or event subscriber for modifying the current alert banners #262

Open
andybroomfield opened this issue Jun 30, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@andybroomfield
Copy link
Contributor

Provide a method for altering the alert banners that are displayed programmatically, not just through condition field.
This is to account for scenarios whereby

  • Global banners might need to be suppressed (Having sections of the site that emulate a microsite eg. Fostering not wanting Council wide announcements are displayed. It's possible to use condition field to target pages and use the include or exclude options, but it is an either / or thing.
  • Change the order of the banners so service specific ones are first
  • Auto hide if several banners so pages don't fill with alerts.

My initial thinking would be either a hook or an event subscriber so this is then available for devs to create the appropriate custom module to meet their needs, interested in others thoughts.

@andybroomfield andybroomfield added the enhancement New feature or request label Jun 30, 2023
@andybroomfield
Copy link
Contributor Author

Whats the best name for the hook?
localgov_alert_banner_banner_alter?
Anything needed to provide to the hooks apart from the banners?
This will be run the point where currentBanners is called (currently in the block) though it might be desirable to pass some context.

@andybroomfield andybroomfield added this to the v1.8 milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant