← Back to Flash message Support
Thanks for this great plugin! I have made it work as expected. But when i try to customize the flash message, It didn't work. It is always the default one. I think I did everything correct. I did add configuration and chose the one I just added in the component. Can you guys help me figure out what the problem is?
Thanks in advance!
Hello @tony17546!
How exactly do you want to customize the flash message?
Try change template (Settings -> template) by this:
<div data-notify="container" class="col-xs-11 col-sm-3 alert alert-{0}" role="alert">
<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>
<span data-notify="icon"></span>
<span data-notify="title">{1}</span>
<span data-notify="message">{2}</span>
<div class="progress" data-notify="progressbar" style="margin-bottom: 0px; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 5px;">
<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
</div>
<a href="{3}" target="{4}" data-notify="url"></a>
</div>
Check this documentation to understand how work the template option.
Thank you for the reply! Actually, I have figured it out. The only problem now is the type is always "danger". But I know I can change that in main.js: document.romanov_flashsettings.type = 'danger';
Thanks again!
1-4 of 4