Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Joomla 2.5:如何在没有菜单的模式窗口中显示组件?_Joomla_Joomla2.5 - Fatal编程技术网

Joomla 2.5:如何在没有菜单的模式窗口中显示组件?

Joomla 2.5:如何在没有菜单的模式窗口中显示组件?,joomla,joomla2.5,Joomla,Joomla2.5,我使用的是JHTML::(('behavior.modal');从链接启动组件的步骤 <a href="/index.php?option=com_contact&view=contact&id=1&tmpl=component" class="modal" title="contact us" rel="{handler: 'iframe', size: {x: 680, y: 370}}"> Contact example</a>

我使用的是JHTML::(('behavior.modal');从链接启动组件的步骤

 <a href="/index.php?option=com_contact&view=contact&id=1&tmpl=component" 
class="modal" title="contact us" rel="{handler: 'iframe', size: {x: 680, y: 370}}">
 Contact example</a>    

它不仅显示联系人页面,还显示菜单和其他模块等其他项目。 有没有办法避免只显示com_联系人页面?我读到可以使用&tmpl=组件,但它不起作用。我使用的是J2.5

编辑:如果我查看视图模板源代码,我会看到tmpl变量被删除了。。。。为什么?

&tmpl=component 
指示Joomla在模板的根目录中查找名为“component.php”的文件,即/templates/your_template/component.php

确保文件在那里。。。否则,您可以使用

&format=raw
这是非常不同的,因为它根本不包括模板,所以你不会得到任何脚本和css

指示Joomla在模板的根目录中查找名为“component.php”的文件,即/templates/your_template/component.php

确保文件在那里。。。否则,您可以使用

&format=raw
这是非常不同的,因为它根本不包括模板,所以你不会得到任何脚本和css