title: Check frontpage of joomla 2.5
body: <p>I was read the instruction from joomla, that if I want to check the current page is front page like below</p>
  
  <pre><code>    &lt;?php
  $app = JFactory::getApplication();
  $menu = $app-&gt;getMenu();
  if ($menu-&gt;getActive() == $menu-&gt;getDefault()) {
          echo 'This is the front page';
  }
  ?&gt;
  </code></pre>
  
  <p>But, when I practised this instruction. The text "This is the front page" is always showed on all pages. How this can happen on my joomla.</p>