I want to put login module in to modal popup. But when I use class="modal" whole page gets loaded in to modal. Can you show me the way to put only module.
This stands also for displaying articles in modal.
I want to put login module in to modal popup. But when I use class="modal" whole page gets loaded in to modal. Can you show me the way to put only module.
This stands also for displaying articles in modal.
The way you can only display the component is to add an extra parameter tmpl=component
in the url.If you'll see the component.php inside your template folder that has mainly <jdoc:include type="component" />
with no module position.So it'll load only component.
I did not try for module but you can try similar for module.So you can try it by just giving the position of the module in whole template like create a new page called modules.php in your template folder and put the module position inside this page.And you call it in a similar way just like component like tmpl=modules
I hope this will work.
I do this fairly often and there are two tricks that can help make this work better. First you will likely want to add
tmpl=component
to your url. This causes Joomla to only display the article instead of the entire template (as long as your template supports this, most do).This should do pretty well. If you want to get even more selective, you can do one of two things:
Add CSS to hide pieces
Use Javascript to select only the piece that you want