Hello,
Bootstrap don't use the same classes for messages. It uses class "alert" instead of messages for example.
I think you should keep the drupal core classes and add the twitter ones, because it can break the normal behaviors of others modules that deals messages. For example Commerce add to cart confirmation
To correct that, you just have to change one line in bootstrap_status_messages() function.
The original code is :
$output .= "<div class=\"alert alert-block$class\">\n";
The new code is :
$output .= "<div class=\"alert alert-block$class messages $type\">\n";
By doing this, you can assure the compatibility with others modules, without breaking the boostrap ones.
Regards,
Alex
Comments
Comment #1
simon georges commentedAll credit goes to zmove if the patch is okay (I just provided the patch to move the issue faster).
Comment #3
simon georges commentedMy bad, I was too fast...
Comment #4
yenidem commentedI use Commerce add to cart confirmation module too, and it conflict with bootstrap theme, I already applied the patch but the overlay does not showing up properly.
How can I completely disable Bootstrap's message function?
please advice.
Comment #5
yenidem commentedHi Simon,
The last patch does not work because the class name have to be messages as Alex typed. The patch contain as message.
Please submit as messages.
thank you for your assist.
Comment #6
pomliane commentedComment #7
markhalliwellThanks @zmove!
Committed a1a2cdf to 7.x-3.x:
Comment #10
ryan.armstrong commentedMoving this to the 8.x-3.x branch as it has been committed to that branch. Making sure the fix gets tested in the Drupal 8 release.
Comment #11
maxplus commentedVery Nice,
I'm using Kalatheme, based on Bootstrap and I added the "function mytheme_status_messages($variables)" to my template.php with the modifications that are posted here.
Works like a charm in combination of Commerce Add To Cart Confirmation.
Thanks!
Comment #13
markhalliwellI'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.