Project

General

Profile

WTemplate and TwitterBootstrap

Added by Sergey Bryukov about 11 years ago

Hi

how to bring TwitterBootstrap component in to template.xml with all needed bootstrap Js ?

For example how to have "Carousel" which requere bootstrap-carousel.js with no action respond to Wt form this component.

Sergey


Replies (2)

RE: WTemplate and TwitterBootstrap - Added by Koen Deforche about 11 years ago

Hey,

So far we've not attempted to include Twitter's JavaScript, instead opting to adopt/adapt our own JavaScript where needed.

You can integrate 3rd party JavaScript using WApplication::require() but it's not a panacea: there may be issues when the library makes assumptions such as of a static page (which is fortunately less the case as single-page JavaScript applications become trendy).

A nicer solution IMO is to only use Twitter's CSS, in combination with a native Wt widget that bypasses or replaces Twitter's JS. That way you'll have an easier way maintaining it.

Regards,

koen

RE: WTemplate and TwitterBootstrap - Added by Thomas Saquet about 11 years ago

Hello,

Koen is right, I spent a lot of time to make my theme js work. But finally I did it (I had no choice, too many things to replace with Wt), this previous topic should provide you some interesting leads :

http://redmine.webtoolkit.eu/boards/2/topics/6110

Good luck and be patient ;)

Regards,

Thomas

    (1-2/2)