Joomla 2.5:如何在不带菜单的模态窗口中显示组件? [英] Joomla 2.5: how do i show a component in modal window without menu?
问题描述
我正在使用JHTML :: _('behavior.modal');从链接中启动组件
I'm using JHTML::_('behavior.modal'); to launch a component from a link doing
<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_contact页面?我读到有可能使用& tmpl = component,但这是行不通的.我正在使用J2.5
It shows the contact page but also other items like menu and other modules. Is there a way to avoid it and showing only com_contact page? I read that it was possible using &tmpl=component but it does not work. I'm using J2.5
如果我在视图模板源代码中查看,我看到tmpl变量被删除了....为什么?
if i look in the view template source code, i see that tmpl variable is removed .... why?
推荐答案
&tmpl=component
指示Joomla在模板的根目录(即/templates/your_template/component.php)中查找名为"component.php"的文件.
instructs Joomla to look for a file named "component.php" in the templates' root directory, i.e. /templates/your_template/component.php.
确保文件在那里...否则,您可以通过
Make sure the file is there... else you can achieve a similar result with
&format=raw
完全不同,因为它根本不包含模板,因此您不会获得任何脚本和CSS.
which is quite different as it does not include a template at all, so you won't get any scripts and css.
这篇关于Joomla 2.5:如何在不带菜单的模态窗口中显示组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!