What is the best way to use bootstrap modal with drupal?

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by vitkuz on May 18, 2013 at 8:54pm

Hi!

Thanks for you work!

I'd like to know what is the best way to use bootstrap modals with druapl. I want to show "Login form" and Status Massages in modal.

My basic (dummie?) aproach:

1) I create html and paste it at the bottom in page.tpl.
2) I create link that trigers modal widow and paste it in block.

It worked! But I feel like the is much better aproach?

Thanks!

Categories: , ,

Comments

Greetings, I haven't

Posted by pyxio on May 19, 2013 at 5:41am

Greetings,

I haven't personally attempted to implement a bootstrap modal yet... however, zenstrap theme http://drupal.org/project/zenstrap has this functionality integrated. I have used the theme in the past and it is a good theme. Give it a shot. Cheers Kevin

Also, if you don't want to

Posted by pyxio on May 19, 2013 at 5:43am

Also, if you don't want to use the theme zenstrap you might be able to find out how they do it by examining the code. Let us know how you solve it. Good luck.

Thanks! It helped.

Posted by vitkuz on May 19, 2013 at 7:46am

Thanks! It helped.

I like to have a block region

Posted by duncan.moo on May 20, 2013 at 6:11am

I like to have a block region for modals and make sure that it has fallback styling and displays if JS is disabled.

For the blocks I then edited the template files so that I could make use of Bootstrap's modal-header, -body and -footer classes, it worked well.

Bootstrap

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /