Joomla 2.5: how do i show a component in modal window without menu?

旧街凉风 提交于 2019-12-25 03:49:52

问题


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>    

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

EDIT: if i look in the view template source code, i see that tmpl variable is removed .... why?


回答1:


&tmpl=component 

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

which is quite different as it does not include a template at all, so you won't get any scripts and css.



来源:https://stackoverflow.com/questions/15320570/joomla-2-5-how-do-i-show-a-component-in-modal-window-without-menu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!