Joomla!: How to hide the Administrator or Front end layout template

April 21st, 2009 by rvdavid Leave a reply »

It’s taken a good part of an hour trying to find how to disable the administrator or front end template for Joomla.
So I thought I’d just make a post in an effort to turn this frustrated energy into something positive.

To display only the contents of the view on the page without being framed by a template, the tmpl variable needs to be set to “component”.

Something along the lines of having the following snippet in the controller method:
JRequest::setVar(‘tmpl’, ‘component’);

Either that, or adding “&tmpl=component” to the URL.

I remember doing it before, however it’s been a while.

All attempts at searching on how to do the above proved frustratingly impossible as the organic search results for google are filled with people asking how to “disable legacy” modes, “templates”, “modules”, “plugins”, how to make your joomla admin panel rock(!!!!) – not what I was looking for!

Anyway, it’s a rather simple, but not particulary obvious thing – I had to track down the code which I had written over 6 months ago to track that snippet down.

Hope this helps other Joomla! component developers :P

if you enjoyed this post, make sure you subscribe to my RSS feed!
You can also follow me on Twitter here.

Related posts:

  1. Security Alert for Joomla 1.5.x Users
  2. Joomla 1.5.7 Security release is now available
  3. Linkr – a beautiful extension for Joomla 1.5
  4. Template View and View Helper Design Patterns in PHP (updated v2)
  5. Your “Legacy Code” – Quick HIDE!


  1. CyberOrca says:

    I have a few trick that maybe help you to complete this article and also very helpfull for the other webmaster or even newbie that want to learn Joomla!. E-Mail me, and i’ll respon…^_^

  2. peter says:

    I testet the last three hours to find exactly your solution. I searched at google, i searched at various joomla pages, didn’t find anything. AND THEN I FOUND YOUR BLOG. GREAT
    One sentence with exact infos.
    Why is it so difficult for the joomla core members to write a complete documentation. The documents for joomla are absolut horrible.
    My knowledge of joomla isn’t enough to do so

  3. John R. says:

    “&tmpl=component” does not work well with SEF.

    I suggest using “JRequest::setVar(’tmpl’, ‘component’);” instead.

  4. rvdavid says:

    peter – glad it heled you out mate, I was in exactly the same position as you were, but couldn’t find anything. I can’t remember how I did it the first time – anyway, glad it helped.

    John R. – how does using query strings not work well with SEF?

  5. Greyholme says:

    I’m new to using Joomla and after the first few bumps have really started to like it. Can anyone provide me a few suggestions for templates?

  6. Vel says:

    Great Post !! I was pulling my hair for an hour ..
    Thanks a lot !

  7. Uriel says:

    I just want to say thanks. People, usually don’t shares what it cost them a lot.

Leave a Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.