Bootstrap modal window is not shown

For Joomla! 3.x Coding related discussions, please use:

Moderator: ooffick

Forum rules
Please use the mailing list here: rather than this forum.
Post Reply
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Fri Feb 22, 2013 11:56 am

Bootstrap modal window is not shown

Post by mostafa272 » Thu May 10, 2018 9:02 am


I am creating a new module and I want to show some details in a modal window when user clicks on the link.
I used following code (in Joomla 3.7) but I don't know why modal window is not shown. Is there a conflict between bootstrap modal and jquery or mootools modal?

Code: Select all


 $modal_params = array();
 foreach ($selectboxs as $selectbox) :

    $modal_params['height'] = "400px";
    $modal_params['width'] = "300px";
	$modal_params['title'] = $selectbox->title;

   $body ='<div><img src="'.$selectbox->image.'" alt="'.$selectbox->title.'" title="'.$selectbox->title.'" />

echo '<a href="#annoncemodal-'.$k.'" class="btn" data-toggle="modal" >'.$selectbox->title.'</a>';
 echo JHTML::_('bootstrap.renderModal','annoncemodal-'.$k,$modal_params, $body);


User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 25303
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Bootstrap modal window is not shown

Post by Per Yngve Berg » Thu May 10, 2018 9:41 am

Does your template use Bootstrap 2.3.2?

Try with Protostar.

Some templates loads a newer version of Bootstrap, which s not compatible.

Post Reply

Return to “Joomla! 3.x Coding”