Site-wide alerts

2 posts by 2 authors in: Forums > CMS Builder Community
Last Post: April 14, 2017   (RSS)

By Toledoh - April 13, 2017

Hi Guys.

I'm playing with having the following as an include throughout my sites, the aim being that any "<?php if (@$errorsAndAlerts): ?>" is handled by a modal window (bootstrap).

I've included a screen-grab as an example.

Can anyone see any issues in doing this?

<?php if (@$errorsAndAlerts): ?>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content panel-danger">
<div class="modal-header panel-heading">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Error !</h4>

<div class="modal-body">
<?php echo nl2br($errorsAndAlerts); ?>


<?php endif ?>

and the following in the footer:


// alert modal



Tim (