【问题标题】:Joomla 2.5: how do i show a component in modal window without menu?Joomla 2.5:如何在没有菜单的模式窗口中显示组件?
【发布时间】:2013-03-10 08:58:20
【问题描述】:

我正在使用 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_contact 页面?我读到可以使用 &tmpl=component 但它不起作用。我正在使用 J2.5

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

【问题讨论】:

    标签: joomla joomla2.5


    【解决方案1】:
    &tmpl=component 
    

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

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

    获得类似的结果
    &format=raw
    

    这是完全不同的,因为它根本不包含模板,所以你不会得到任何脚本和 css。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-11
      • 1970-01-01
      • 1970-01-01
      • 2013-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多