Cris
Cris

Reputation: 12204

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

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?

Upvotes: 0

Views: 1493

Answers (1)

Riccardo Zorn
Riccardo Zorn

Reputation: 5615

&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.

Upvotes: 3

Related Questions