8.4.2: how to make a dismissable alert?
<div class="alert alert-danger"> <?php echo t('This is an alert'); ?> </div>
How can I make it dismissable?
<div class="alert alert-success"> <?php echo t('This is an alert'); ?> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div>
My reply is a bit late, but you can find more information on notifications in this tutorial.
I wrote the initial version and community member mnakalay expanded on some of the explanations. If you find any information missing, feel free to add to it.
I was wondering about the Bootstrap alert (that kind attached), not a PNotify alert.
As to the PNotify alerts, they only work for registered users. I could not find any easy way of showing them for non-registered users without rewriting them myself from scratch. It would be great if this is not the case and the Howto can be updated.