Skip to content

Commit

Permalink
Merge pull request #142 from StrykeSlammerII/patch-2
Browse files Browse the repository at this point in the history
`id="alerts-page"` update
  • Loading branch information
lcharette authored May 17, 2024
2 parents 5b1018e + 8ae373b commit 5068ea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/18.advanced/07.alert-stream/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Alternatively, you may choose to store alerts in the [user cache](/advanced/cach

In your client-side code, alerts are primarily handled by the `ufAlerts` jQuery plugin. The `/core/assets/userfrosting/js/uf-init.js` Javascript asset, which is loaded as part of the `js/main` [asset bundle](/asset-management/asset-bundles), will look for an element with an `id` of `alerts-page` and automatically fetch and render any alerts into this element when a page is first loaded.

A `div` element with `id="alerts-page"` is already included in the `core/templates/pages/abstract/default.html.twig` template, so any pages that extend this template will already have this included. For pages that do not extend this template, you will need to include the following wherever you want alerts to appear:
The `/pages/abstract/default.html.twig` template in the Admin-LTE sprinkle and the `/pages/abstract/base.html.twig` template in the Admin sprinkle both contain a `div` element with `id="alerts-page"`. For pages that do not extend either template, you will need to include the following wherever you want alerts to appear:

```html
<div id="alerts-page"></div>
Expand Down

0 comments on commit 5068ea2

Please sign in to comment.