大家好我在joomla 3做一个网站
我想在打开模态窗口时执行任务,我在模态中显示视图,我这样做..
这是执行任务的路由器
<?php $link = JRoute::_('index.php?option=com_projects&view=proyectos&task=este&id='. $item->id);?>
<div class="span4">
<a href="#.<?php echo $link; ?>" role="button" class="btn" data-toggle="modal">
<img src="<?php echo JURI::root()?>/<?php echo $item->imagenportada; ?>"/></a>
</div>
现在是模态窗口
<div id="<?php echo $link ?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
但不行。任何想法!
答案 0 :(得分:1)
查看Twitter Bootstrap的JS和CSS已加载 http://twitter.github.com/bootstrap/javascript.html#modals
答案 1 :(得分:0)
最后我添加到我的链接
<a href="#modal" title="<?php $item->id?>" id="<?php echo $item->id; ?>" role="button" class="picture" data-toggle="modal">
和模态窗口
<div id="modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>