如何将Joomla 2.5后台视图放入模态窗口?

3

我想在模态窗口中打开组件后端视图。但是我的尝试都导致了一个在iframe中显示整个后端的模态窗口。我使用了这个链接来打开窗口:

<?php 
$link = 'index.php?option=com_serveradmin&view=filehistory&layout=modal&id=' . (int)$file->id;
?>
<a href="<?php echo JRoute::_($link);?>" class="modal"
rel="{handler: 'ajax', size: {x: 875, y: 550}, onClose: function() {}}" >
<?php echo $file->orig_name; ?>
</a>

视图文件夹包含带有以下代码的modal.php文件:
    defined('_JEXEC') or die;
    JHtml::_('behavior.modal');
    ?>

<h1>This is the file history</h1>

只显示这些内容,这是我想要在第一步展示的全部内容。有人尝试过这个吗?有没有实现的方法?谢谢提前。


3
您可以在您的URL中添加"tmpl=component"。更多详情请参考这里-https://dev59.com/JmrXa4cB1Zd3GeqPAZOL#13283708 - Irfan
1个回答

0

您可以在URL中添加tmpl=component,这样Joomla将仅呈现组件而不使用模板。实际上,Joomla将使用当前模板中的component.php


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接