Removing A Mambo/Joomla Template

Now there’s a misleading title but I had cause to ask a Mambo site to output some info without a template. Sadly it didn’t want to do that – although if you know another method, please leave a comment…

The official method is to call www.mysite.com/index2.php but that still parses the page and adds an alternate stylesheet and header information. It’s good, but not perfect.

So instead I’ve created a whole new template – with nothing in it.

This can be called with:

  • Mambo: www.mysite.com/?mos_change_template=blank
  • Joomla: www.mysite.com/?jos_change_template=blank

Start with a new folder in templates called “blank” and create templateDetails.xml

templateDetails.xml

Now create the index.php file[html]< ?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< ?php mosMainBody(); ?>

[/html]You’ll have noticed that there is still some basic html in there, add or remove as necessary.I’ve used this where another site has wanted a portion in an iframe, others may need it for serious debugging.

Ref: howtojoomla.net

Categories

Recent Comments

Tags

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.