jonathancraddock.com
Hiking Recipes Photography Blog
  
Detect Joomla Frontpage   ( jonathancraddock.com http://jonathancraddock.com/images/M_images/arrow.png History  )
Sunday, 22 November 2009 23:40

Found a nice easy way to identify your current location on your Joomla site, with the following code from a Joomla forum:

<?php $menu = &JSite::getMenu();
if ($menu->getActive() == $menu->getDefault())
{
// Script here will execute only on frontpage.
}
?>

I think it may be handy to fine tune a couple of page elements that I can't seem to find any conventional way to get at.

Also noticed that the upgrade to Joomla 1.5.15 at the weekend messed up the MCE editor. It turned out some of the defaults had changed and needed to be edited in the Plugin Manager. There's a "Functionality" radio button that had to go from "Advanced" to "Extended". I dread to think what the "Basic" setting does!

 
 

Twitter Updates

    Follow me!