title: How to display a message on joomla homepage only?
body: <p>How can I display a message only on the homepage of joomla?
  I am interested in displaying it on site.com and not site.com/index.php/page or anything else then site.com.</p>
  
  <p>I have tested the following:</p>
  
  <pre><code>    &lt;?php $app = JFactory::getApplication(); 
      $menu = $app-&gt;getMenu(); 
      $lang = JFactory::getLanguage(); 
  if ($menu-&gt;getActive() == $menu-&gt;getDefault($lang-&gt;getTag())) : ?&gt;this is the homepage
      &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>&lt;?php $menu = &amp; JSite::getMenu();
  if ($menu-&gt;getActive() == $menu-&gt;getDefault()) {
      echo "this is the homepage";
  }
  ?&gt;
  </code></pre>
  
  <p>The problem is that I can still see the message "this is the homepage" on pages like <a href="http://site.com/index.php/category/id/78-article" rel="nofollow">http://site.com/index.php/category/id/78-article</a> which clearly isn't the homepage. It seems that whenever there is index.php in the link, the above code thinks it belongs to the homepage.</p>