I use Bootstrap 2.3.2 and Liferay 6.2 bundled with Tomcat. I have some modal windows with complex body structure created in Bootstrap 2.3.2 and I would like to use them in my portal. Here is said that Liferay uses Bootstrap 2.3.2 css, but not Bootstrap 2.3.2 javascript and components like modals, tooltips, tabs, ... are included in AlloyUI.
I included Bootstrap 2.3.2 javascript and tried to use my modal windows, but if I want to show a modal window it doesn't appear. I would like to ask, how can i show native bootstrap modals in Liferay.
i face the same problem after a lot of search i found this code you can test it in your portlet
"my issue is appearing iframe in dialog on lifray but i cant because of aui.css conflicted with bootstrap.css "
you can check this link "liferay savvy"
According to the documentation that you link to, Liferay does not include Bootstrap JS plugins:
But AlloyUI does have support for modals:
http://alloyui.com/examples/modal/
HTML:
Javascript:
The reason that your modal is not appearing is most likely due to the fact that your modal uses the
hide
CSS class and the following CSS rule is declared in Liferay 6.2:This causes your modal to always be hidden. To workaround this, I recommend avoiding the
hide
class and addingstyle="display: none;"
to yourmodal
div
like so:Below is a runnable example of the above code. If you want to use it in the portal, simply remove the
<link>
element which is loading the bootstrap CSS (it is surrounded by comments).