I have setup fancybox2 in my joomla3 site. It is working, but I need to display only the component area inside the window when a link is clicked. Is there a way of doing this?

My fancybox js currently is:

<script type="text/javascript">
    $(document).ready(function() {
        type: 'iframe',
        openEffect: 'elastic',
        closeEffect: 'elastic'

2 Answers 2


As @subashbasnet8 pointed out, you can add tmpl=component to your URL. This will display your site using the file JOOMLAROOT/templates/YOURTEMPLATE/component.php, a template file that loads the HTML headers and your component area (as opposed to the index.php file that usually is loaded).

You can modify this file if needed, or you can create your own custom view by adding another .php file to your template directory, e.g. JOOMLAROOT/templates/YOURTEMPLATE/customview.php. This customized file can be used by adding tmpl=customview to your url.

Regarding SEF urls, take a look at this answer.


If you want to load only component in view add tmpl=component in url of that page you want to open. for example:

     (this will load whole joomla site)


    (this will load only component part in view).

hope this will help.

  • Thanks for replying. I'm a bit confused: is this supposed to work with sef urls? e.g /sefurl&tmpl=component
    – DDA
    Commented Jan 29, 2015 at 11:44
  • try using JRoute class while creating url for more <?php echo JRoute::_('index.php?option=com_component&view=page&tmpl=component'); ?> Commented Jan 29, 2015 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.